# Cygwin Ruby Woes

**URL:** <https://rubytalk.org/t/cygwin-ruby-woes/4064>\
**Category:** ruby-talk\
**Created:** [11 January 2003 20:42 UTC](https://rubytalk.org/t/cygwin-ruby-woes/4064 "2003-01-11T20:42:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Travis](https://avatars.discourse-cdn.com/v4/letter/t/bbce88/32.png) [@Travis](https://rubytalk.org/u/Travis)\
**Post date:** [11 January 2003 20:42 UTC](https://rubytalk.org/t/cygwin-ruby-woes/4064/1 "2003-01-11T20:42:45Z")

</div>

Hello, I recently switched from the one-click Windows installer ruby to  
cygwin ruby because I’m writing some C extensions. Everything has worked out  
great so far except for the fact that I can’t start ruby outside of the cygwin  
environment. I need a way to invoke my script without my users having to go  
into cygwin and manually type ruby program.exe. Right now, ruby is installed  
in C:\cygwin\usr\local\bin. I’ve tried adding that directory to my Windows  
path, but I get “A required .DLL file, CYGWIN1.DLL, was not found.”. I’m  
using the latest cygwin and ruby 1.6.8. The program I’m attempting to run is  
C:\cygwin\home\Solids\libserial-0.2\wedge.rb, which translates to  
/home/Solids/libserial-0.2/wedge.rb inside of cygwin.

Any help would be greatly apprecitaed,  
Travis Whitton [whitton@atlantic.net](mailto:whitton@atlantic.net)

---

<div class="post-metadata">

**Author:** ![Amoreton](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@Amoreton](https://rubytalk.org/u/Amoreton)\
**Post date:** [11 January 2003 20:48 UTC](https://rubytalk.org/t/cygwin-ruby-woes/4064/2 "2003-01-11T20:48:04Z")

</div>

[whitton@atlantic.net](mailto:whitton@atlantic.net) (Travis Whitton) wrote in  
[aWhT9.4907$M7.1388@news.bellsouth.net](mailto:aWhT9.4907$M7.1388@news.bellsouth.net):

> Hello, I recently switched from the one-click Windows installer ruby to  
> cygwin ruby because I’m writing some C extensions. Everything has worked  
> out great so far except for the fact that I can’t start ruby outside of  
> the cygwin environment. I need a way to invoke my script without my users  
> having to go into cygwin and manually type ruby program.exe. Right now,  
> ruby is installed in C:\cygwin\usr\local\bin. I’ve tried adding that  
> directory to my Windows path, but I get “A required .DLL file,  
> CYGWIN1.DLL, was not found.”. I’m using the latest cygwin and ruby 1.6.8.  
> The program I’m attempting to run is  
> C:\cygwin\home\Solids\libserial-0.2\wedge.rb, which translates to  
> /home/Solids/libserial-0.2/wedge.rb inside of cygwin.
> 
> Any help would be greatly apprecitaed,  
> Travis Whitton [whitton@atlantic.net](mailto:whitton@atlantic.net)

Try adding c:\cygwin\bin to the Windows path as well, and everything should  
work .

```
AndyM

```

---

<div class="post-metadata">

**Author:** ![Jason\_Ashbaugh](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@Jason\_Ashbaugh](https://rubytalk.org/u/Jason_Ashbaugh)\
**Post date:** [11 January 2003 20:54 UTC](https://rubytalk.org/t/cygwin-ruby-woes/4064/3 "2003-01-11T20:54:40Z")

</div>

There are two ways to solve this I know of…

1. Make sure that the cygwin/usr/bin directory is in your path
2. copy the .dll to windows/system

I think that takes care of the problem, but let me know if it doesn’t.

Jason

> **···**
>
> On Saturday 11 January 2003 03:42 pm, Travis Whitton wrote:
> 
> > “A required .DLL file, CYGWIN1.DLL, was not found.”

---

<div class="post-metadata">

**Author:** ![Mark\_Probert2](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@Mark\_Probert2](https://rubytalk.org/u/Mark_Probert2)\
**Post date:** [11 January 2003 23:06 UTC](https://rubytalk.org/t/cygwin-ruby-woes/4064/4 "2003-01-11T23:06:16Z")

</div>

Hi.

> **···**
>
> At 05:42 AM 1/12/2003 +0900, you wrote:
> 
> > Hello, I recently switched from the one-click Windows installer ruby to  
> > cygwin ruby because I’m writing some C extensions.
> 
> If the C extensions are not Unix-specific (ie use fork()) then you  
> can use mingw ([www.mingw.org](http://www.mingw.org)) to compile them. It gives you gcc  
> plus some additional tools. That way you can keep the one-click  
> installer …
> 
> Regards,
> 
> -mark.

---

<div class="post-metadata">

**Author:** ![Gavin\_Sinclair](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Gavin\_Sinclair](https://rubytalk.org/u/Gavin_Sinclair)\
**Post date:** [12 January 2003 11:26 UTC](https://rubytalk.org/t/cygwin-ruby-woes/4064/5 "2003-01-12T11:26:03Z")

</div>

Has anyone gone down this path? Have you installed a complete  
unix-like environment based on mingw? I’d be very interested to know  
some details.

Gavin

> **···**
>
> On Sunday, January 12, 2003, 10:06:16 AM, Mark wrote:
> 
> > > Hello, I recently switched from the one-click Windows installer ruby to  
> > > cygwin ruby because I’m writing some C extensions.
> 
> > If the C extensions are not Unix-specific (ie use fork()) then you  
> > can use mingw ([www.mingw.org](http://www.mingw.org)) to compile them. It gives you gcc  
> > plus some additional tools. That way you can keep the one-click  
> > installer …

---

<div class="post-metadata">

**Author:** ![Gerrit\_P\_Haase](https://avatars.discourse-cdn.com/v4/letter/g/87869e/32.png) [@Gerrit\_P\_Haase](https://rubytalk.org/u/Gerrit_P_Haase)\
**Post date:** [13 April 2003 10:06 UTC](https://rubytalk.org/t/cygwin-ruby-woes/4064/6 "2003-04-13T10:06:19Z")

</div>

Hallo Jason,

> > "A required .DLL file, CYGWIN1.DLL, was not found."

> There are two ways to solve this I know of...  
> 1. Make sure that the cygwin/usr/bin directory is in your path  
> 2. copy the .dll to windows/system

No! Never copy cygwin1.dll from its assigned place to your system  
directory! You can have only one cygwin1.dll loaded and as soon as  
you update your cygwin installation, your installation is broken.

Gerrit

> **···**
>
> --  
> =^..^=

---

<div class="post-metadata">

**Author:** ![Mark\_Probert](https://avatars.discourse-cdn.com/v4/letter/m/d2c977/32.png) [@Mark\_Probert](https://rubytalk.org/u/Mark_Probert)\
**Post date:** [13 January 2003 02:50 UTC](https://rubytalk.org/t/cygwin-ruby-woes/4064/7 "2003-01-13T02:50:17Z")

</div>

Hi.

Gavin Sinclair wrote in comp.lang.ruby:

> > If the C extensions are not Unix-specific (ie use fork()) then you  
> > can use mingw ([www.mingw.org](http://www.mingw.org)) to compile them. It gives you gcc  
> > plus some additional tools. That way you can keep the one-click  
> > installer …
> 
> Has anyone gone down this path? Have you installed a complete  
> unix-like environment based on mingw? I’d be very interested to know  
> some details.

Hmmmm … not “cmoplete”, though a fairly reasonable subset. Cygwin  
gives you such tools as perl which you don’t get with msys, the mingw  
environment. And I think that gdb is pretty unstable under mingw.  
You do get rvxt around bash, which is nice, though I also added zsh  
form the UnxUtils collection

```
http://www.weihenstephan.de/~syring/win32/UnxUtils.html

```

to cover some of the bases that the msys version of bash doesn’t (the  
bash supplied is a little flakey about running some applications).

As an environment for Ruby it works well. Better, IMHO, than standard  
DOS box (under Win2k). The XP console is improved, so your shell  
mileage may vary, however, the tools are great.

One caveat about my system is that it is quite messy. In addition  
to mingw, I also have cygwin-gcc and MSVC6 as C compilers. I can  
giev you a “pure mingw” report in a week or so (my work hard-drive  
is being replaced and I am going to have to rebuild everything ☹ )

Regards,

-mark.

> **···**
>
> > On Sunday, January 12, 2003, 10:06:16 AM, Mark wrote:
