Hi, When I type Rails in Cygwin I got the following error: c:\ruby\bin\ruby.exe: No such file or diretory -- /cygdrive/c/ruby/bin/rails (LoadError) However, Rails works ok with DOS promt. Any ideas? Thanks Ming
Hi, When I type Rails in Cygwin I got the following error: c:\ruby\bin\ruby.exe: No such file or diretory -- /cygdrive/c/ruby/bin/rails (LoadError) However, Rails works ok with DOS promt. Any ideas? Thanks Ming
Hello, That''s probably because on the DOS prompt "c:\ruby\bin\rails\rails.cmd" gets executed. In cygwin "c:\ruby\bin\rails\rails" gets executed and it contains the following line: #!c:/ruby/bin/ruby Maybe if you change this to #!/cygdrive/c/ruby/bin/ruby (haven''t tried it) The 1st line in shell scripts (the one with #!) tells the shell which program to use to execute this script. Since cygwin doesn''t understand "#!c:/ruby/bin/ruby" (at least the c:/ part I think) this doesn''t work ''out of the box''. On 8/1/05, Ming Ma <mingworld-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > When I type Rails in Cygwin I got the following error: > > c:\ruby\bin\ruby.exe: No such file or diretory -- > /cygdrive/c/ruby/bin/rails (LoadError) > > However, Rails works ok with DOS promt. > > Any ideas? > > Thanks > > Ming > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
I just edited my ~/.profile in a cygwin command shell adding: PATH=/cygdrive/c/ruby/bin:$PATH and I can now run ruby (after starting a new shell) without the error: ruby: No such file to load -- ubygems (LoadError) Thanks for the tip... the error makes it appear to be something else. McD
Hi McD, How can I edit ~/.profile? (I am Cygwin newbie) I can only see a .bash_profile, and I added the line you provided to this file. It didn''t work. Any ideas? Thanks. Ming> -----Original Message----- > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails- > bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Dave McDorman > Sent: Wednesday, 3 August 2005 7:39 AM > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails] Re: Cygwin and Rails Command > > I just edited my ~/.profile in a cygwin command shell > adding: > > PATH=/cygdrive/c/ruby/bin:$PATH > > and I can now run ruby (after starting a new shell) > without the error: > > ruby: No such file to load -- ubygems (LoadError) > > Thanks for the tip... the error makes it appear to be something else. > > McD > > > > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Hi, I think you also need to put the following in your .bashrc: export RUBYOPT (The Windows Ruby installer sets this environment variable and it somehow conflicts with the ruby from cygwin) Hope this helps, Jeroen Janssen On 8/4/05, Ming Ma <mingworld-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi McD, > > How can I edit ~/.profile? (I am Cygwin newbie) > I can only see a .bash_profile, and I added the line you provided to this > file. It didn''t work. Any ideas? Thanks. > > Ming > > > -----Original Message----- > > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails- > > bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Dave McDorman > > Sent: Wednesday, 3 August 2005 7:39 AM > > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: [Rails] Re: Cygwin and Rails Command > > > > I just edited my ~/.profile in a cygwin command shell > > adding: > > > > PATH=/cygdrive/c/ruby/bin:$PATH > > > > and I can now run ruby (after starting a new shell) > > without the error: > > > > ruby: No such file to load -- ubygems (LoadError) > > > > Thanks for the tip... the error makes it appear to be something else. > > > > McD > > > > > > > > > > > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >