Shawn Mclean
Shawn Mclean

Reputation: 57469

rails is not found when trying to start a new rails project

I just installed Eclipse, then Ruby 1.9.2 then RailsInstaller. I then installed Aptana plugin for eclipse.

My directory setup are as follows:

C:\Ruby192
C:\RailsInstaller\Ruby1.8.7

When I create a new rails project in Eclipse, It throws this error:

LOL@LOL-PC /d/Projects/rail 
$ rails .
sh.exe": rails: command not found

I found this solution, but it seems its for linux. I'm using Windows 7.

I reinstalled rails and ruby but its the same thing. I also had installed GitBash and GitExtensions a few months ago and had this problem. I solved it by pointing to the directory where Git was and setting the Default environment to HOME.

I now have no idea what to do to use ruby on rails in this error.

Upvotes: 0

Views: 1707

Answers (1)

diedthreetimes
diedthreetimes

Reputation: 4115

Add the place where you installed rails to your PATH environment variable. (Presumably C:\Ruby192\lib\ruby\gems\1.9.1\gems\rails*\bin)

I also noticed you are using the RailsInstaller for ruby 1.8.7 but seem to have installed ruby 1.9.2. This may cause trouble in the future.

Try following this guide for installing rails on windows. It uses gem install instead of the out dated RailsInstaller.

Upvotes: 1

Related Questions