Hi,
I'm new to ruby on rails, but let me let you know, I'm very excited
about learning it. Anyway, I'm trying to create a controller through
the console but something makes it not work. I am running windows
vista and using Instant Rails. Firstly I open up a ruby console
window, and go to the directory of my app, named training. As soon as
I get there I type script/generate and it says 'script' is not
recognized as an internal or external command... I also tried script/
generate say (that will be the name of the controller). That gives the
same output. I've also tried:
script/generate controller
script/generate controller say
./script/generate controller say
/script/generate controller say
etc.
I checked and I have the folder script, with generate inside. I'm been
trying to figure this out for days, so please, any help would be
deeply appreciated. If I am unclear, please say so.
Thanks for the quick reply!
Man I feel like a complete idiot! After looking at only one other post
here I realized I was forgetting to put ruby in front of script.
So-just throw a "ruby " on the front there & you should be good.
BTW, what that's doing is taking the ruby script called
'generate' (note the lack of a file extension--very non-windows-y)
which lives in the 'script' subdirectory of your app, and passing it
to the ruby interpreter. On other platforms you just pass the script
file to the OS for execution, and it looks on the "shebang" line (the
one starting with #!) to see what binary executable to use.