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 Reply-To: cygwin AT cygwin DOT com To: Mike Boone cc: cygwin AT cygwin DOT com Subject: Re: Ruby on Rails 2.0.2/Cygwin Bug In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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/