delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/12/19/23:59:58

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Wed, 19 Dec 2007 23:59:07 -0500 (EST)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Mike Boone <boonedocks AT gmail DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Ruby on Rails 2.0.2/Cygwin Bug
In-Reply-To: <d45df6780712191829xaab8c3kc844f16d04d247ad@mail.gmail.com>
Message-ID: <Pine.GSO.4.63.0712192355080.18738@access1.cims.nyu.edu>
References: <d45df6780712191829xaab8c3kc844f16d04d247ad AT mail DOT gmail DOT com>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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 AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019