Uninitialized constant OpenSSL::Digest::SHA1


#1

I just updated my ruby from 1.8.2 to the Windows Installer 184-16 RC1,
and now when I try to start Webrick I get the following:

c:/program
files/dev/ruby/lib/ruby/site_ruby/1.8/rubygems/security.rb:18:
uninitialized constant OpenSSL::Digest::SHA1 (NameError)
from c:/program files/dev/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:397
from c:/program files/dev/ruby/lib/ruby/site_ruby/1.8/ubygems.rb:4

From security.rb:
if Gem.ssl_available?
PKEY_RSA = OpenSSL::PKey::RSA
(18) DIGEST_SHA1 = OpenSSL::Digest::SHA1

Any ideas?


#2

So I started from a fresh directory and that bug went away, but now
Webbrick says Booting then just exits without any message…


#3

slain wilde wrote:

So I started from a fresh directory and that bug went away, but now
Webbrick says Booting then just exits without any message…

Hi Slain,

don’t know if this will fix your problem, but I got a similar error
after updating to 184-16 RC1 in order to install Mongrel.

What worked for me (from a bug report on Rubyforge at
http://rubyforge.org/tracker/index.php?func=detail&aid=3248&group_id=126&atid=575)
was

"
adding :
–begin code–
require ‘openssl/digest’
–end code–
to gem_openssl.rb after line 28 (require ‘openssl’)
"

hope this helps

Stuart


#4

Yea, I got it to work (SHA1) by installing ruby to a fresh(empty)
directory. My webrick not starting problem was because I needed to
upgrade engines for 1.1 or it silently killed webrick.

Thanks tho.