# Script/generate problem

**URL:** <https://www.ruby-forum.com/t/script-generate-problem/92110>\
**Category:** Rails\
**Created:** [April 16, 2007, 8:41am UTC](https://www.ruby-forum.com/t/script-generate-problem/92110 "2007-04-16T08:41:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitr0z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ba9def/32.png) [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Post date:** [April 16, 2007, 8:41am UTC](https://www.ruby-forum.com/t/script-generate-problem/92110/1 "2007-04-16T08:41:06Z")

</div>

Hello group,  
I’m just trying to learn RubyOnRails and I bought a book that uses a  
bookstore as an example.  
I downloaded and installed InstantRails for my XP machine and I think  
all went well, I just ran the ran the rails bookstore command and it  
generated a long list of new files and directories.  
I changed to the bookstore directory and then tried to run the

script/generate controller about index  
command to start creating the skeleton files and I now get an error  
message saying that

“script is not recognized as an internal or external command”

Can anyone help me out on this?  
Did I not get the InstantRails application installed correctly?

Any suggestions would be greatly appreciated  
Thanks  
James

---

<div class="post-metadata">

**Author:** ![nitr0z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ba9def/32.png) [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Post date:** [April 16, 2007, 9:24am UTC](https://www.ruby-forum.com/t/script-generate-problem/92110/2 "2007-04-16T09:24:15Z")

</div>

Hi James !

James Agostinho wrote:

> …  
> “script is not recognized as an internal or external command”

Seems to me your missing the “ruby” command in front of this.

The generate script is in the directory script of your rails application  
directory. It’s a ruby script.

Try to go to your application directory and look at the script directory  
: you will find the generate.rd file. Then at the root of your  
application type :

ruby script\generate (and what-you-want options following)

Hope I do not say any stupid thing.  
Tony

---

<div class="post-metadata">

**Author:** ![nitr0z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ba9def/32.png) [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Post date:** [April 16, 2007, 3:14pm UTC](https://www.ruby-forum.com/t/script-generate-problem/92110/3 "2007-04-16T15:14:41Z")

</div>

Tony,  
Thanks, that worked!  
I checked the rest of the book and the book “Begining Ruby Ob Rails”  
omits Ruby from every command in the entire book. I wonder if it was  
written for a different system, and I have to make adjustments for  
Windows.  
Anyway thanks for the help.  
James

Tony wrote:

> Hi James !
> 
> James Agostinho wrote:
> 
> > …  
> > “script is not recognized as an internal or external command”
> 
> Seems to me your missing the “ruby” command in front of this.
> 
> The generate script is in the directory script of your rails application  
> directory. It’s a ruby script.
> 
> Try to go to your application directory and look at the script directory  
> : you will find the generate.rd file. Then at the root of your  
> application type :
> 
> ruby script\generate (and what-you-want options following)
> 
> Hope I do not say any stupid thing.  
> Tony
