Article:
  Rolling with Ruby on Rails
Subject:   Stuck at test empty web application
Date:   2005-06-17 01:20:26
From:   Jo_in_NZ
I am running Windows Server 2003, installed on the D; drive.
When I installed Ruby, running the command ruby -v from D:> I get "'ruby' is not recognized as an internal or external command, operable program or batch file". To get the output shown in this tutorial, I have to change to the ruby\bin directory. I struck the same situation with the "gem install rails --remote" command and the "rails cookbook" command. Hence my cookbook directory has ended up in my ruby\bin directory. This is where I get stuck - the cookbook directory has the script directory created inside it, and that has a file named server in it, but if I run ruby script\server from that directory I get "'ruby' is not recognized as an internal or external command, operable program or batch file" again. I can't run cookbook\script\server from the ruby\bin directory - this results in "ruby: no such file or directory-- /cookbook/script/server <LoadError>". In the cookbook/scripts folder, the files have no extensions - is this normal?
Full Threads Oldest First

Showing messages 1 through 3 of 3.

  • Curt Hibbs photo Stuck at test empty web application
    2005-06-17 04:07:02  Curt Hibbs | O'Reilly AuthorO'Reilly Blogger [View]

    No, its not normal. It sounds like the ...ruby\bin directory didn't get added to you path. Go check and add it if its not there. Also, make sure you've got an environment variable named RUBYOPT that is set to "rubygems" (without the qutoe characters). That should have been set too.
    • Stuck at test empty web application
      2005-06-17 17:26:53  Jo_in_NZ [View]

      Not sure which path you are talking about - where should I be checking? Thanks for your help.
      • Curt Hibbs photo Stuck at test empty web application
        2005-06-17 21:58:01  Curt Hibbs | O'Reilly AuthorO'Reilly Blogger [View]

        Right-click on the My Computer icon on your desktop and select Properties. Click on the "advanced" tab, and then click on the "Environment Variables" button.

        In the bottom list box (labeled "System Variables"), scroll down to the "Path" variable. The value should begin with "c:\ruby\bin;" (if you installed to the default location). If it doesn't, then something went wrong during the installation (perhaps you didn't have Administrator rights).

        Anyway, if its not there, you can double-click on "Path" to edit the value and add it (you may need to reboot for the change to take effect).