From: "M. Edward (Ed) Borasky" Date: 2008-06-12T23:57:41+09:00 Subject: Re: Help with Ruby under cygwin James Byrne wrote: > In order to use git on my laptop (MS XPproSP3) I ended up installing the > cygwin environment. I tried MSysGit but it failed to run and the > maintainer was, shall we say, less than enthusiastic with my bug report. > > Now, everything works from the standard windows dos box. However, when > I try and run a ruby utility such as gem, rake or rails from within the > cygwin bash shell window then each gives the same style of error: > > $ which rails > /cygdrive/c/usr/lib/ruby/bin/rails > $ rails > c:\usr\lib\ruby\bin\ruby.exe: No such file or directory -- > /cygdrive/c/usr/lib/r > uby/bin/rails (LoadError) > $ > $ which gem > /cygdrive/c/usr/lib/ruby/bin/gem > $ gem list > c:\usr\lib\ruby\bin\ruby.exe: No such file or directory -- > /cygdrive/c/usr/lib/r > uby/bin/gem (LoadError) > $ > $ which rake > /cygdrive/c/usr/lib/ruby/bin/rake > $ rake > c:\usr\lib\ruby\bin\ruby.exe: No such file or directory -- > /cygdrive/c/usr/lib/r > uby/bin/rake (LoadError) > > I am not having this problem with anything else and so I am first asking > for help here since I expect the cygwin people will turn me to this > forum in the end in any case. > > Any insight anyone can provide me as to what is going on here would be > most appreciated. I'm not on my Cygwin system at the moment; I can check it later today and give you a definitive answer. But it looks like your paths aren't right. The Ruby executable itself in a Cygwin prompt should show up as /usr/bin/ruby. If you type 'which ruby' from the prompt that's what you should see. And the libraries should be in /usr/lib/ruby/... . What I would recommend is uninstalling everything and reinstalling rubygems from source. Then reinstall rails and its dependencies with "gem install".