Monday, May 4, 2009

How to Generate a RubyOnRails Project

To create a new rails project or application, you need first to install rails, ruby, sql and other tools needed for your project. After successfull installation, simply run the rails command on the command-line were as the argument. Ruby will now create the application and supporting scripts.

New Project
rails blog

Change directory to your new blog directory.
$ cd blog


$blog>ruby script\generate controller controller_name
$blog>ruby script\destroy controller controller_name

$blog>ruby script\generate model model_name
$blog>ruby script\destroy model model_name

$blog>ruby script/generate migration migration_name

$blog>ruby script/generate plugin plugin_name

The name of our new project will be blog.


My Linux Support Inc.