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.
> http://dev.rubyonrails.org/ticket/10544
>
> 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.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
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:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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