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 in advanced for your time and help. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I''m not on windows, but I think you need to do: ruby script/generate controller say If you just: ruby script/generate controller it will display a brief help of the command and options. On Mar 25, 3:53 pm, cz231 <cz2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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 in advanced for your time and help.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. Thanks again, problem solved though. On Mar 25, 5:57 pm, Karl Smith <threadh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m not on windows, but I think you need to do: > > ruby script/generate controller say > > If you just: > ruby script/generate controller > > it will display a brief help of the command and options. > > On Mar 25, 3:53 pm, cz231 <cz2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > 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 in advanced for your time and help.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
jon733-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2008-Mar-25 22:59 UTC
Re: Creating a Controller
ruby script/generate controller say You need ruby at the start of the command or windows will trow a wobly at you :) On 25 Mar, 22:53, cz231 <cz2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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 in advanced for your time and help.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On windows you''ve got to say: ruby script\generate blah blah blah 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. Cheers, -Roy On Mar 25, 3:53 pm, cz231 <cz2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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 in advanced for your time and help.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---