I have installed:
-Aptana studio v 3.0.9
-Ruby 192p290
-DevKit
-Git
And I was creating rails project using aptana and run the rails s command from its terminal; everything worked fine till yesterday.
I tried to do the same but I got an error when dealing with any rails commands like:
rails new .
or
gem -v
Error is:
$ rails new .
C:\Ruby192\bin\ruby.exe: No such file or directory -- /cygdrive/c/Ruby192/bin/rails (LoadError)
$ rails -v
C:\Ruby192\bin\ruby.exe: No such file or directory -- /cygdrive/c/Ruby192/bin/rails (LoadError)
$ gem -v
C:\Ruby192\bin\ruby.exe: No such file or directory -- /cygdrive/c/Ruby192/bin/gem (LoadError)
I don't know what going on, I googled the problem and followed every instruction that could help me, but the same problem still exists.
Also I uninstalled Aptana, Ruby, DevKit and Git and reinstalled them again.
Note that the everything works fine outside Aptana so nothing wrong with the environment variables pathes, the error in Aptana itself. Also I use the instructions here.
My system is
Windows Vista
The only new thing that I did since the last time aptana was working with rails that I installed virtualbox to run ubuntu inside windows.
Any Ideas to solve the problem?
I managed to solve it by making alias for gem, ruby & rails. I found the ans here.
So All what I wrote the following commands in the terminal of Aptana:
alias ruby='C:/ruby192/bin/ruby.exe'
alias rails='C:/ruby192/bin/rails'
alias gem='C:/ruby192/bin/gem'
And it works fine now, running rails from inside aptana terminal on a windows machine.
Related
I installed Ruby and Rails and set-up the PATH to "C:\Rails\Ruby2.3.0\bin", but when I try to run commands with rails, I get the error message:
The System cannot find the path specified.
I am able to run commands using ruby, and rails works if I use GitBash. How do I make it work on my normal command line?
Had the same problem here, installed the same way. Couldn't even run rails commands on GitBash, only way was going in C:\Rails\Ruby2.3.0\binthrough cmd and typing, for example, ruby rails new projectname. The rails new projectnamewouldn't work even in these conditions.
What I did was going in the Command Prompt with Ruby and Rails and entered gem install rails (which did not work on cmd). I also did gem install bundle. Both installed successfully and that fixed all consoles for me: cmd, GitBash (wasn't working for me), Command Prompt with Ruby and Rails and even cmder works with Rails now.
Hope this helps you.
Cheers.
If it's a simple question of locating the rails executable on Windows, then on later installs that use msys64 instead of DevKit, you'll find rails at the following folder:
c:\msys64\o-rdoc
Add this to your PATH or execute from that folder.
Your path may vary on 32-bit systems or if you changed the default install folder.
Got a new machine and ported settings and files over. Went to update to Rails 3.2 and now I'm getting a list of installed gems when I run "gem list" but when I run the rails command, it tells me: Rails isn't installed.
I'm running OS X Lion and Rails 3.2. I've tried editing the path and creating a symlink and nothing seems to work. I'd be grateful for any help!
Try this tutorial and install Ruby Version Manager. It's got all the steps I followed to get ruby working on my mac.
http://seanbehan.com/mac-os-x/installing-and-using-rvm-on-mac-os-x-creating-gemsets-and-reverting-to-original-environment/
I am trying to get Ruby on Rails going on my Windows 7 machine. I am using gitbash and have install ruby using ruby installer. All my gems have installed successfully (Rails 3.0.7), but when I try to run a command like rails s I get sh.exe": rails: command not found
echo $PATH gives me:
/c/Users/Dave/bin:.:/usr/local/bin:/mingw/bin:/bin:/c/Ruby192/bin:/c/Program Files/Common Files/Microsoft Shared/Windows Live:/c/Program Files/NVIDIA Corporation/PhysX/Common:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/c/Program Files/Common Files/Adobe/AGL:/c/Program Files/QuickTime/QTSystem/:/c/Program Files/Common Files/Microsoft Shared/Windows Live
Since the path for Ruby is in there I am at a bit of a loss for how to be able to start the rails server.
running gem install rails fixed it
This Problem confuses basic developers. Because they simultaneously use both Git Bash & Command Prompt with Ruby and Rails.
When we type "Rails any command" in CMD with Ruby and Rails, we don't see any failure. But if we run the same command in gitbash means, we get the result "Command not found". Running "Gem install rails" fixs it for gitbash users as the above sayings.
For those who use both Git and Cmd with ROR, they can get the command executed anyhow by running on any of the one...
I setup rails 3.1.0.rc5 on my friends vista machine last week. Everything installed and i can run an application we're working on just fine, however, the rails command does not resolve. To start the server, i had to do the old fashioned: ruby script/rails s style. He has the ruby bin on his path, as ruby -v resolves fine. Any ideas on what to check?
Note i downloaded a 1.9.2 installer from rubyinstaller.org, setup the dev pack, and installed rails through bundler.
It sounds like your path isn't pointing to your rails gem bin.
My first suggestion was going to be use rvm but since you're on windows that won't be an option. RVM suggested pik for windows users, and if it works similar to RVM, you'll save yourself a ton of headaches.
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.
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.