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

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

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

Migration
$blog>ruby script/generate migration migration_name

Plugin
$blog>ruby script/generate plugin plugin_name


The name of our new project will be blog.

ENJOY!


My Linux Support Inc.
www.mylinuxsupport.com

No comments:

Post a Comment