This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ruby on Rails 2.0.2/Cygwin Bug

On Wed, 19 Dec 2007, Mike Boone wrote:

> Can anyone running Cygwin and Ruby on Rails comment on this problem?
> Create a Rails 2.0.2 application and see if it fails with this error:
> No such file or directory - /dev/urandom
> I filed a bug on Rails, please read for more details.
> I'm not sure if this is Cygwin's fault or something peculiar about the
> Rails code, though it looks reasonable.

Well, /dev/urandom certainly exists in Cygwin.  I'm not a Ruby expert, but
considering that adding a puts() before the file open seems to fix it, I'd
look somewhere in the Ruby code.  But you can try running the original
under strace to see what exactly Ruby is trying to do with /dev/urandom.

Also note that if, for some reason, you end up with non-Cygwin Ruby *or* a
non-Cygwin DLL that Ruby gets its File library from, it will definitely
not know about /dev/urandom.

In short, strace is your friend.  In particular, it will tell you the
exact Windows error Ruby gets when trying to open the device, as well as
any path translations that Cygwin tries to do in that case.
      |\      _,,,---,,_ |
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"That which is hateful to you, do not do to your neighbor.  That is the whole
Torah; the rest is commentary.  Go and study it." -- Rabbi Hillel

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]