1

我刚刚捆绑安装成功,现在启动 rails 服务器时出现此错误。

我已经尝试通过安装 openssl 并重新安装 rvm 来启动服务器。我正在使用 rvm 1.8.7 和 rails 3.0.10。

rony@linuxmint ~/Documents/trunk $ rails s
/home/rony/.rvm/gems/ruby-1.8.7-p370/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require': no such file to load -- openssl (LoadError)
    from /home/rony/.rvm/gems/ruby-1.8.7-p370/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
    from /home/rony/.rvm/gems/ruby-1.8.7-p370/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /home/rony/.rvm/gems/ruby-1.8.7-p370/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:593:in `new_constants_in'
    from /home/rony/.rvm/gems/ruby-1.8.7-p370/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /home/rony/.rvm/gems/ruby-1.8.7-p370/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
    from /home/rony/.rvm/gems/ruby-1.8.7-p370/gems/stripe-1.7.0/lib/stripe.rb:7
    from /home/rony/.rvm/gems/ruby-1.8.7-p370@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:in `require'
    from /home/rony/.rvm/gems/ruby-1.8.7-p370@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:in `require'
    from /home/rony/.rvm/gems/ruby-1.8.7-p370@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:in `each'
    from /home/rony/.rvm/gems/ruby-1.8.7-p370@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:in `require'
    from /home/rony/.rvm/gems/ruby-1.8.7-p370@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `each'
    from /home/rony/.rvm/gems/ruby-1.8.7-p370@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `require'
    from /home/rony/.rvm/gems/ruby-1.8.7-p370@global/gems/bundler-1.2.1/lib/bundler.rb:128:in `require'
    from /home/rony/Documents/trunk/config/application.rb:8
    from /home/rony/.rvm/gems/ruby-1.8.7-p370/gems/railties-3.0.10/lib/rails/commands.rb:28:in `require'
    from /home/rony/.rvm/gems/ruby-1.8.7-p370/gems/railties-3.0.10/lib/rails/commands.rb:28
    from /home/rony/.rvm/gems/ruby-1.8.7-p370/gems/railties-3.0.10/lib/rails/commands.rb:27:in `tap'
    from /home/rony/.rvm/gems/ruby-1.8.7-p370/gems/railties-3.0.10/lib/rails/commands.rb:27
    from script/rails:6:in `require'
    from script/rails:6
4

1 回答 1

2

参考这个

rvm pkg install openssl (older format - rvm package install openssl)
rvm pkg install iconv (older format - rvm package install iconv)
rvm remove 1.9.2
rvm install 1.9.2 -C --with-openssl-dir=$HOME/.rvm/usr,--with-iconv-dir=$HOME/.rvm/usr

归功于http://www.isnull.com.ar/

于 2012-09-20T09:35:13.397 回答