rails generate basics

create controller with help and home routes

$ rails generate controller StaticPages home help --no-test-framework

the option no-test-framework suppresses the default rspec test (or test::unit).

if you have created them by mistake, you can destroy them.

$ rails destroy controller StaticPages home help --no-test-framework

Creating a model is the same.

$ rails generate model Foo bar:string baz:integer
$ rails destroy model Foo

Errors

Could not find a javascript runtime.
Install node.js.

rails generate basics

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s