# Irb in cygwin

**URL:** <https://www.ruby-forum.com/t/irb-in-cygwin/194679>\
**Category:** Ruby\
**Created:** [September 9, 2010, 12:58am UTC](https://www.ruby-forum.com/t/irb-in-cygwin/194679 "2010-09-09T00:58:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yankees26](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/eb9ed0/32.png) [@yankees26](https://www.ruby-forum.com/u/yankees26)\
**Post date:** [September 9, 2010, 12:58am UTC](https://www.ruby-forum.com/t/irb-in-cygwin/194679/1 "2010-09-09T00:58:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![yankees26](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/eb9ed0/32.png) [@yankees26](https://www.ruby-forum.com/u/yankees26)\
**Post date:** [September 9, 2010, 3:00am UTC](https://www.ruby-forum.com/t/irb-in-cygwin/194679/2 "2010-09-09T03:00:53Z")

</div>

On Sep 8, 7:58 pm, Joao S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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/](http://blog.mmediasys.com/2008/10/27/handy-tip-dont-mix-one-click-installer-with-cygwin/)
