Cygwin Ruby Woes

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

whitton@atlantic.net (Travis Whitton) wrote in
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

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

AndyM

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.”

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) to compile them. It gives you gcc
plus some additional tools. That way you can keep the one-click
installer …

Regards,

-mark.

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) to compile them. It gives you gcc
plus some additional tools. That way you can keep the one-click
installer …

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

···

--
=^..^=

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) 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 :frowning: )

Regards,

-mark.

···

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