"No random device" on windows when running rails 2.1

28 views
Skip to first unread message

Mountain Drummer

unread,
Jul 3, 2008, 3:55:51 PM7/3/08
to Ruby on Rails Windows
This is a copy of a message I posted to the railsforum site, but
haven't gotten a response.....

I am attempting to install rails on Windows XP.

I have succesfully installed the following:

ruby 1.8.7 windows binary
rubygems 1.2.0
rails 2.1.0
readline.dll
readline.so
zlib.dll

Now, when I try to create a new rails project with the rails command,
I get a 'No random device' error.

Is there any way to configure rails 2.1 to not try to use the random
device? Or is there a way to add a random device to Windows to satisy
rails?

Here is the full trace output:

c:/ruby-1.8.7/lib/ruby/1.8/securerandom.rb:74:in `random_bytes': No
random device (NotImplementedError)
from c:/ruby-1.8.7/lib/ruby/1.8/securerandom.rb:91:in `hex'
from c:/ruby-1.8.7/lib/ruby/gems/1.8/gems/rails-2.1.0/bin/../
lib/rails_generator/secret_key_generator.rb:61:in
`generate_secret_with_secure_random'
from c:/ruby-1.8.7/lib/ruby/gems/1.8/gems/rails-2.1.0/bin/../
lib/rails_generator/secret_key_generator.rb:21:in `send'
from c:/ruby-1.8.7/lib/ruby/gems/1.8/gems/rails-2.1.0/bin/../
lib/rails_generator/secret_key_generator.rb:21:in `generate_secret'
from c:/ruby-1.8.7/lib/ruby/gems/1.8/gems/rails-2.1.0/bin/../
lib/rails_generator/generators/applications/app/app_generator.rb:39:in
`manifest'
from c:/ruby-1.8.7/lib/ruby/gems/1.8/gems/rails-2.1.0/bin/../
lib/rails_generator/commands.rb:42:in `invoke!'
from c:/ruby-1.8.7/lib/ruby/gems/1.8/gems/rails-2.1.0/bin/../
lib/rails_generator/scripts/../scripts.rb:31:in `run'
from c:/ruby-1.8.7/lib/ruby/gems/1.8/gems/rails-2.1.0/bin/
rails:17
from c:/ruby-1.8.7/bin/rails:19:in `load'
from c:/ruby-1.8.7/bin/rails:19

Thanks,

Ryan

Bob Ngu

unread,
Jul 3, 2008, 4:54:24 PM7/3/08
to Ruby on Rails Windows
Total shot in the dark here since I don't have Ruby 1.8.7 but Rails
2.1 specifically recommends using Ruby 1.8.6 and not 1.8.7, maybe it
has something to do with that?
http://www.rubyonrails.org/down

Luis Lavena

unread,
Jul 3, 2008, 6:37:56 PM7/3/08
to Ruby on Rails Windows
On Jul 3, 9:55 pm, Mountain Drummer <ryang...@gmail.com> wrote:
> This is a copy of a message I posted to the railsforum site, but
> haven't gotten a response.....
>
> I am attempting to install rails on Windows XP.
>
> I have succesfully installed the following:
>
> ruby 1.8.7 windows binary
> rubygems 1.2.0
> rails 2.1.0
> readline.dll
> readline.so
> zlib.dll
>
> Now, when I try to create a new rails project with the rails command,
> I get a 'No random device' error.
>
> Is there any way to configure rails 2.1 to not try to use the random
> device? Or is there a way to add a random device to Windows to satisy
> rails?
>
> Here is the full trace output:
>

1.8.7 AFAIK is broken. There is a release under works.

In any case, there are reports of securerandom being broken (several
messages about RubySpec in ruby-core).

I can suggest you try One-Click Installer with latest patches (from
previous message in this forum) which should work without issues with
Rails 2.1 (been using it without problems).

Regards,
--
Luis Lavena
Reply all
Reply to author
Forward
0 new messages