How to Generate Controllers from the command line

Am I doing this correct.

ruby script/generate controller Site index about help

after I run the line above from the command prompt it spits out

exists app/controllers/
exist app/helpers/
create app/views/site

What does exists and create mean, is exists telling me that those
controllers now exists, and is create telling me I need to create
controllers? How do I create controllers for views and so forth?

it's saying that the app/controllers folder already existed but that
it had to create the app/views/site folder


Being a newbie myself, I will add a word of caution.

Compare the version the book is based on, with what you are running. I
was on Rails 2.2.2 and its syntax for scaffold generation is different
from the earlier versions in the sense that the attributes are
expected in the command line now.

I learnt that the hard way.
So if you are using the latest and greatest, read the book with a
pinch of salt and check the net when in doubt!

Hope this helps.
I am using Rails 2.2.2 on Ruby 1.8.6 using MySQL 5.0 on WinXP. This
config just works for me.

Aside: Started off with Komodo and then jRuby on NetBeans IDE , using
MySQL 6.0 on Vista 64-bit but it was a mess cause half the time the
IDE was tripping me up and some gems/plugins wouldnt install
correctly. Dont know if it was because of Vista or NetBeans on 64-bit.
I had to use MySQL 6.0 as that is the only one which would run on
Vista 64-bit. but then some Rails stuff was not certified for mySQL
6.0 so ultimately I got out of that rat hole.


Hey, welcome to the club!

I am in same boat. and m learning as I go. If you know Ruby basics,
you can dive into Rails tutorials. and working on a real program then
whets your appetite.

As for myself - I am reading The Rails Way by Obie after looking at a
few other books. It gives me context around the rails constructs.
I read a book about Ruby too as that was a huge stumbling block for
me. The syntax is different as I come from C,C++, Java world. This
book I skimmed thru as I just needed to get familiar with the
different syntax.

The rest will come as I work thru code and look at other code. That
said, everyone has their own best way of learning!

cheers from another newbie!

RailsSpace was written with Rails 1.1.2 and Ruby 1.8.4 but there's a
web site referenced in the book that makes the files for Rails 2
available. The site also has an ephemeris with corrections for the
code as printed in the book.