Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Aptana Ruby on Rails Problem, rails: command not found

I installed Aptana Studio 3 and attempted to create my first Rails file, only to receive the error

sh.exe: rails: command not found

Am I supposed to edit my System Variables to include the Path? If so, where the heck is rails.exe because I cannot find that directory.

like image 802
ProgrammingAnt Avatar asked Aug 08 '26 14:08

ProgrammingAnt


2 Answers

Based on your "sh.exe" filename, I am assuming you are running Windows. You will need to verify that the command "rails" is accessible in your system path so that Aptana can find it. Do this by modifying the "PATH" system variable to include the directory to your Ruby installation (this may require a restart to take affect).

Instructions for modifying the system path can be found here: http://www.computerhope.com/issues/ch000549.htm

If you used an installer of Ruby packaged for Windows such as Railsinstaller, point to the path of this installation. Gems will place executable files in the "\bin" folder. The "rails" executable is a script from the rails gem.

like image 81
Ben Simpson Avatar answered Aug 10 '26 07:08

Ben Simpson


I have the same problem and I have solved it. I am using Windows 7 with Aptana Studio 3. The problem is that actually Rails is not installed on my Computer after I installed Aptana Studio 3.

Basically I follow the instructions given by this website

First you need a ruby installer for windows. After installation, Click on Start Command Prompt with Ruby from Start->All program->ruby folder and type gem install rails in command line and you are done. Wish that you can solve your problem as well.

like image 23
Fei Avatar answered Aug 10 '26 07:08

Fei



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!