rails generate basics


create controller with help and home routes

[sourcecode language="bash"]
$ rails generate controller StaticPages home help --no-test-framework
[/sourcecode]

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

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

[sourcecode language="bash"]
$ rails destroy controller StaticPages home help --no-test-framework
[/sourcecode]

Creating a model is the same.

[sourcecode language="bash"]
$ rails generate model Foo bar:string baz:integer
$ rails destroy model Foo
[/sourcecode]

Errors

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