1

Mac で openssl の問題が発生し続けます。Railsタスクを発行しようとすると、エラーメッセージに完全に当惑します。問題は何ですか?端末に入力するとopenSSL>セッションが開くため、間違いなく自分のマシンにopensslがあります。

次のことを試みるたびに:RAILS_ENV=development rake db:migrate 以下のエラーが表示されます:

rake aborted!
no such file to load -- openssl

(See full trace by running task with --trace)

--trace オプションを付けて上記を入力すると、以下にリストされているエラーが表示されます。

入力して Rails サーバーを起動しようとするとrails s、次のエラーが表示されます。

   $> rails s
/usr/local/rvm/gems/ruby-1.9.2-p320/gems/net-ssh-2.6.6/lib/net/ssh/transport/openssl.rb:2:in `require': no such file to load -- openssl (LoadError)
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/net-ssh-2.6.6/lib/net/ssh/transport/openssl.rb:2:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/net-ssh-2.6.6/lib/net/ssh/buffer.rb:2:in `require'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/net-ssh-2.6.6/lib/net/ssh/buffer.rb:2:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/net-ssh-2.6.6/lib/net/ssh/transport/algorithms.rb:1:in `require'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/net-ssh-2.6.6/lib/net/ssh/transport/algorithms.rb:1:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/net-ssh-2.6.6/lib/net/ssh/transport/session.rb:7:in `require'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/net-ssh-2.6.6/lib/net/ssh/transport/session.rb:7:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/net-ssh-2.6.6/lib/net/ssh.rb:10:in `require'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/net-ssh-2.6.6/lib/net/ssh.rb:10:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/net-ssh-gateway-1.2.0/lib/net/ssh/gateway.rb:2:in `require'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/net-ssh-gateway-1.2.0/lib/net/ssh/gateway.rb:2:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/capistrano-2.14.2/lib/capistrano/configuration/connections.rb:2:in `require'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/capistrano-2.14.2/lib/capistrano/configuration/connections.rb:2:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/capistrano-2.14.2/lib/capistrano/configuration.rb:5:in `require'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/capistrano-2.14.2/lib/capistrano/configuration.rb:5:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/capistrano-2.14.2/lib/capistrano.rb:3:in `require'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/capistrano-2.14.2/lib/capistrano.rb:3:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `require'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `each'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `block in require'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `each'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `require'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/bundler-1.3.4/lib/bundler.rb:132:in `require'
    from /Users/imtiazahmad/scripts/xxx-patchtrack/config/application.rb:7:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.6/lib/rails/commands.rb:53:in `require'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.6/lib/rails/commands.rb:53:in `block in <top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.6/lib/rails/commands.rb:50:in `tap'
    from /usr/local/rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.6/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'
4

1 に答える 1

1

ssl サポートを使用して Ruby を再構築してみてください。

port install openssl +universal
rvm install 1.9.2 --with-openssl-dir=/opt/local
于 2013-03-29T19:25:01.740 に答える