views:

990

answers:

6

So I installed Ruby On Rails using the Windows Installer.

Now the startup guides says I have to start up an Terminal and run the Rails command to make a project. I don't have a terminal, so how do I execute a Rails command and make a project??

The CMD command line in Windows does not recognize "rails"

I don't think it is an PATH problem, because when I'm in the "Bin" directory, there is "rails.bat" and "rails" with no extension. If I run Rails.bat I get "The filename, directory name, or volume label syntax is incorrect."

I get that message with whatever Argument I pass to it.

A: 

I think they mean the command window. Try running it from a command line.

Edited the question to clarify
IceHeat
+1  A: 

To get a terminal

  1. Start > Run... or Windows key + R

  2. Type "cmd" and hit enter.

To add a folder to the command line's path

On Windows XP (Vista is similar)

Start > Control Panel > System

Click the "Advanced" tab

Click "Environmental Variables"

Under "System Variables" double click on Path and edit accordingly.

You will need to open a new command line in order to get the updated path to take affect. With XP, I've had to reboot to force it to take affect but it shouldn't be necessary.


The Path variable is a semi-colon seperated list of folders in which the Command Line or "terminal" looks for commands.

You'll probably have to find the rails command yourself. I would try looking for a rails.bat or rails.cmd file.

epochwolf
I don't think it is an PATH problem, because when I'm in the "Bin" directory, there is "rails.bat" and "rails" with no extension. If I run Rails.bat I get "The filename, directory name, or volume label syntax is incorrect."
IceHeat
I get message with whatever argument passed, usch as C:\Rails\Projects\blogs
IceHeat
Please update your question to reflect this information.
epochwolf
A: 

I dont know where the Windows Ruby on Rails intaller places its files, but the ultimately solution is that you need to make sure that the "rails" command is is your PATH - which you can view/modify by right-clicking My Computer, selecting Properties, going to the Advanced tab and then clicking on "Environment Variables" and then scrolling down until you see "PATH" and adjusting it accordingly. You probably need to find the directory where the "rails" command lives and append to the end of the existing PATH entry, inserting a ";" before you enter the new path to append it to the existing PATH.

So find where "rails" is and add its directory to your PATH.

Cody Caughlan
A: 

You probably have to change your PATH in Windows to point to wherever the rails executable has been installed.

The PATH environment variable is used to determine where Windows looks for stuff; when you type, for instance, 'calc' Windows will hunt through its PATH and eventually find and run C:\Windows\calc.exe. In your case, the PATH doesn't include the directory you need, so Windows isn't searching in that directory for rails.exe when you type "rails."

To fix this, right click on "My Computer" -> "Properties" -> "Advanced" -> "Environment Variables" and then modify the PATH one to include the directory your rails.exe is in.

+7  A: 

It seems to be a bug in the rails.bat file because of double-quotes, like:

@"ruby.exe"" "%~dpn0" %*

Remove the double quotes:

http://sepitfalls.blogspot.com/2008/12/updateing-rubygems-broke-gem-command.html

IceHeat
A: 

I recommend using cygwin for Rails development on windows - far too much of the community is using *nix. If you install the development tools package you'll automatically have svn, git and other doo-dads that you'll eventually need relating to various rails plugin installation. If you want to deploy using capistrano the installation is identical to all the instructions you find. Plus other tips and tricks people will reference will work exactly the same for you as it does for them, whereas some things are different for native windows and all the accessory tools have to be installed separately.

Jeremy
Yeah, I almost tought I needed a MAC to run Rails :|However I now have everything running with Netbeans.
IceHeat
I hope deploying Rails on a Linux host will be painless...
IceHeat