`
simonli
  • 浏览: 32341 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
最近访客 更多访客>>
社区版块
存档分类
最新评论

no such file to load -- openssl (RuntimeError)

阅读更多
今天更新了Rails到2.0.2版本,启动application时出现了一下错误:
=> Booting WEBrick...
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:159:in `require_frameworks': no such file to load -- openssl (RuntimeError)
        from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:88:in `process'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:49:in `send'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:49:in `run'
        from /home/simon/dev/depot/config/environment.rb:13
        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
         ... 7 levels...
        from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39
        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from script/server:3


一开始还以为自己没有安装 openssl, 一查已经 安装过openssl,原来是少安装了libopenssl-ruby

simon@simon-laptop:~$ sudo apt-cache search libopenssl-ruby
ruby1.8 - Interpreter of object-oriented scripting language Ruby 1.8
libopenssl-ruby - OpenSSL interface for Ruby
libopenssl-ruby1.8 - OpenSSL interface for Ruby 1.8
libopenssl-ruby1.9 - OpenSSL interface for Ruby 1.9



我使用的是ruby1.8,所以就 sudo apt-get install libopenssl-ruby1.8
然后重启应用,问题解决。
分享到:
评论
4 楼 yangzhihuan 2008-10-27  
我今天也碰到这个问题,按楼主的方法完美解决了。
话说那个错误提示误人不少,我一开始也是以为没有安装openssl的ruby库。
3 楼 simonli 2008-07-14  
Solaris下也必须安装openssl with ruby
2 楼 Aryang 2008-06-18  
Solaris该怎么装?
1 楼 liusu 2008-02-18  
Same problem with you.
After update rails to 2.0.2, i get the same exception with you when i run script/server.

I do same with you, but also failed. Any other method to resolve this problem?
Thx.

相关推荐

Global site tag (gtag.js) - Google Analytics