# Ruby and cygwin: supported?

**URL:** <https://www.ruby-forum.com/t/ruby-and-cygwin-supported/48584>\
**Category:** Ruby\
**Created:** [November 22, 2005, 1:20pm UTC](https://www.ruby-forum.com/t/ruby-and-cygwin-supported/48584 "2005-11-22T13:20:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pascal.Sartoretti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/977dab/32.png) [@Pascal.Sartoretti](https://www.ruby-forum.com/u/Pascal.Sartoretti)\
**Post date:** [November 22, 2005, 1:20pm UTC](https://www.ruby-forum.com/t/ruby-and-cygwin-supported/48584/1 "2005-11-22T13:20:43Z")

</div>

Hello,

I have tried to use ruby from the Cygwin environment under Windows. Some  
things work, some don’t… Is it supported? Are there any tricks?

Thanks for any help

Pascal Sartoretti

---

<div class="post-metadata">

**Author:** ![Pascal.Sartoretti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/977dab/32.png) [@Pascal.Sartoretti](https://www.ruby-forum.com/u/Pascal.Sartoretti)\
**Post date:** [November 22, 2005, 1:28pm UTC](https://www.ruby-forum.com/t/ruby-and-cygwin-supported/48584/2 "2005-11-22T13:28:45Z")

</div>

Robert K. wrote:

> What exactly do you mean by this? [cygwin.com](http://cygwin.com) maintains a ruby package so  
> in a way you can say it’s supported.

I didn’t know! I just installed Ruby the “regular” way, and wanted to be  
able to invoque it from the Cygwin shell.

> Which things didn’t work for you?

For instance, when using gem:

c:\ruby\bin\ruby.exe: No such file or directory –  
/cygdrive/c/ruby/bin/gem (LoadError)

I have the feeling that ruby is lost between the Windows and the Cygwin  
way of naming directories.

Pascal

---

<div class="post-metadata">

**Author:** ![Pascal.Sartoretti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/977dab/32.png) [@Pascal.Sartoretti](https://www.ruby-forum.com/u/Pascal.Sartoretti)\
**Post date:** [November 22, 2005, 1:40pm UTC](https://www.ruby-forum.com/t/ruby-and-cygwin-supported/48584/3 "2005-11-22T13:40:49Z")

</div>

Pascal Sartoretti wrote:

> Robert K. wrote:
> 
> > What exactly do you mean by this? [cygwin.com](http://cygwin.com) maintains a ruby  
> > package so in a way you can say it’s supported.
> 
> I didn’t know!

You could have easily checked.

> I just installed Ruby the “regular” way, and wanted to  
> be able to invoque it from the Cygwin shell.

I guess you better deinstall it and fetch the ruby package from cygwin.

> > Which things didn’t work for you?
> 
> For instance, when using gem:
> 
> c:\ruby\bin\ruby.exe: No such file or directory –  
> /cygdrive/c/ruby/bin/gem (LoadError)
> 
> I have the feeling that ruby is lost between the Windows and the  
> Cygwin way of naming directories.

Probably. Note that there are cygpath and File.join(). I didn’t try to  
use gems with cygwin yet.

Cheers

```
robert

```

---

<div class="post-metadata">

**Author:** ![Pascal.Sartoretti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/977dab/32.png) [@Pascal.Sartoretti](https://www.ruby-forum.com/u/Pascal.Sartoretti)\
**Post date:** [November 22, 2005, 2:01pm UTC](https://www.ruby-forum.com/t/ruby-and-cygwin-supported/48584/4 "2005-11-22T14:01:03Z")

</div>

On Tue, 22 Nov 2005, Pascal Sartoretti wrote:

> c:\ruby\bin\ruby.exe: No such file or directory – /cygdrive/c/ruby/bin/gem  
> (LoadError)

Did you install rubygems in the same way as you installed your  
cygwin ruby? The paths are setup with respect to the ruby you are  
using it with.

> I have the feeling that ruby is lost between the Windows and the Cygwin way of  
> naming directories.

They are effectively two separate installs. You probably want your  
.bashrc or \_bashrc to sort out the paths properly for cygwin as  
well. it should not be looking for ruby stuff in /cygrdrive/c/ruby  
because that is the C:\ruby directory that the Windows setup uses,  
which has ruby built against different DLL files. The default ruby  
install will put ruby in /usr/local/bin/ruby and so on. And ruby  
built from sources does not have rubygems built in.

> Pascal

```
    Hugh
```

---

<div class="post-metadata">

**Author:** ![Pascal.Sartoretti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/977dab/32.png) [@Pascal.Sartoretti](https://www.ruby-forum.com/u/Pascal.Sartoretti)\
**Post date:** [November 23, 2005, 2:18am UTC](https://www.ruby-forum.com/t/ruby-and-cygwin-supported/48584/5 "2005-11-23T02:18:11Z")

</div>

I ran into this problem a while ago: Uninstall your native Windows  
version, and get the cygwin version. It’s really hard (impossible,  
maybe) to make the native version play nicely with cygwin. I also had  
to recompile Ruby from source, as one of the bundled cygwin binaries  
kept crashing.

Jacob

---

<div class="post-metadata">

**Author:** ![Pascal.Sartoretti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/977dab/32.png) [@Pascal.Sartoretti](https://www.ruby-forum.com/u/Pascal.Sartoretti)\
**Post date:** [November 23, 2005, 3:02am UTC](https://www.ruby-forum.com/t/ruby-and-cygwin-supported/48584/6 "2005-11-23T03:02:25Z")

</div>

to invoke a win version of ruby from the cygwin shell, just add an alias  
to  
it in your .profile file:

alias ruby=’/cygdrive/c/ruby/bin/ruby’

dave

---

<div class="post-metadata">

**Author:** ![Pascal.Sartoretti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/977dab/32.png) [@Pascal.Sartoretti](https://www.ruby-forum.com/u/Pascal.Sartoretti)\
**Post date:** [November 23, 2005, 7:03pm UTC](https://www.ruby-forum.com/t/ruby-and-cygwin-supported/48584/7 "2005-11-23T19:03:45Z")

</div>

Awesome cool–thanks! Looks like this is a good thing too:

alias irb=’/cygdrive/c/ruby/bin/irb.bat’

-Roy

---

<div class="post-metadata">

**Author:** ![Pascal.Sartoretti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/977dab/32.png) [@Pascal.Sartoretti](https://www.ruby-forum.com/u/Pascal.Sartoretti)\
**Post date:** [November 22, 2005, 1:24pm UTC](https://www.ruby-forum.com/t/ruby-and-cygwin-supported/48584/8 "2005-11-22T13:24:44Z")

</div>

Pascal Sartoretti wrote:

> Hello,
> 
> I have tried to use ruby from the Cygwin environment under Windows.  
> Some things work, some don’t… Is it supported? Are there any tricks?

What exactly do you mean by this? [cygwin.com](http://cygwin.com) maintains a ruby package  
so  
in a way you can say it’s supported. Which things didn’t work for you?  
I’m quite happy with the cygwin version most of the time. But then  
again,  
I don’t do GUI stuff…

Kind regards

```
robert

```
