Irb in cygwin

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)?

On Sep 8, 7:58 pm, Joao S. [email protected]
wrote:

it looks like I need to add an alias to my bash_profile. So I did:
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/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs