Ruby/Rails newb here. I need help getting started

I’m trying to follow the videos over on
http://www.loudthinking.com/arc/000328.html.
The first bit of it was fine, but then it says to type “ruby script
\new_controller Hello index”. My scripts folder doesn’t contain
anything even similar to “new_controller”. According to the generated
“index.html” page, it says “Use script/generate to create your models
and controllers” but it never really explains how to use generate to
make a controller. I tried “ruby script\generate Hello index” and it
didn’t work.

For the record, I’m using XP.

On 9/17/07, wardrich [email protected] wrote:

I’m trying to follow the videos over on http://www.loudthinking.com/arc/000328.html.
The first bit of it was fine, but then it says to type “ruby script
\new_controller Hello index”. My scripts folder doesn’t contain
anything even similar to “new_controller”. According to the generated
“index.html” page, it says “Use script/generate to create your models
and controllers” but it never really explains how to use generate to
make a controller. I tried “ruby script\generate Hello index” and it
didn’t work.

I’m not familiar with those videos, but the proper form would be:

ruby script/generate controller Hello index

“Hello” is the “base” name of your controller (The file created will
be called app/controllers/hello_controller.rb and the class will be
HelloController), and “index” is an action you want to define within
the controller. You can always add actions later, so this isn’t
critical. It just creates a stub controller method and a stub view
file.

Hi, try using ‘generate’ instead of new_controller. For example, “ruby
script\generate controller Hello index” would be the proper for under
Windows XP.

Good luck,

-Conrad