irb in cygwin

J

Joao Silva

I'm trying to use ruby in Cygwin (my own Ruby installation of 1.9.2, not
the version that comes with Cygwin).

However, entering 'irb'/'ruby'/'gem' or whatever doesn't work off the
bat, and I get an
c:\Ruby192\bin\ruby.exe: No such file or directory --
/cygdrive/c/Ruby192/bin/irb(LoadError)
error.

From this post:
http://www.ruby-forum.com/topic/11441
it looks like I need to add an alias to my bash_profile. So I did:
alias irb='/cygdrive/c/Ruby192/bin/irb.bat'
alias ruby='/cygdrive/c/Ruby192/bin/ruby.exe'
alias gem='/cygdrive/c/Ruby192/bin/gem.bat'

However, irb/ruby still don't work (although gem does). I get a slightly
different error:
: No such file or directoryin/irb.bat

If I run the alias on my own, though, it works fine.

What do I need to do be able to just type 'irb' and 'ruby' in cygwin
(without using cygwin's installation)?
 
L

Luis Lavena

I'm trying to use ruby in Cygwin (my own Ruby installation of 1.9.2, not
the version that comes with Cygwin).

However, entering 'irb'/'ruby'/'gem' or whatever doesn't work off the
bat, and I get an
c:\Ruby192\bin\ruby.exe: No such file or directory --
/cygdrive/c/Ruby192/bin/irb(LoadError)
error.

From this post:http://www.ruby-forum.com/topic/11441
it looks like I need to add an alias to my bash_profile. So I did:
alias irb='/cygdrive/c/Ruby192/bin/irb.bat'
alias ruby='/cygdrive/c/Ruby192/bin/ruby.exe'
alias gem='/cygdrive/c/Ruby192/bin/gem.bat'

However, irb/ruby still don't work (although gem does). I get a slightly
different error:
: No such file or directoryin/irb.bat

If I run the alias on my own, though, it works fine.

What do I need to do be able to just type 'irb' and 'ruby' in cygwin
(without using cygwin's installation)?

You're mixing things, cygwin is expecting find bash wrappers but it
finds the batch files instead and files.

Do not mix cygwin with native Ruby, you can compile your own version
of Ruby inside cygwin.

An alternative will be use MSYS bash that is more friendly to batch
scripts, but still, is not ideal.

http://blog.mmediasys.com/2008/10/27/handy-tip-dont-mix-one-click-installer-with-cygwin/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top