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
然后重启应用,问题解决。

你可能感兴趣的:(cache,Solaris,Ruby,rubygems,Rails)