Rails 3: jopenssl load error
I gett this error when I try to run rails s
. It works in production, but not on my local Mac OSX.
Any ideas?
/gems/jruby-openssl-0.7.3/lib/openssl.rb:66:in `require': no such file to load -- jopenssl (LoadError)
from /Users/username/.rvm/gems/ruby-1.8.7-p330@SocialBlast/gems/jruby-openssl-0.7.3/lib/openssl.rb:66
from /Users/kellymkampen/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/net/https.rb:102:in `require'
from /Users/username/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/net/https.rb:102
from /Users/username/.rvm/gems/ruby-1.8.7-p330@SocialBlast/gems/oauth-0.4.4/lib/oauth/consumer.rb:2:in `require'
from /Users/username/.rvm/gems/ruby-1.8.7-p330@SocialBlast/gems/oauth-0.4.4/lib/oauth/consumer.rb:2
from /Users/username/.rvm/gems/ruby-1.8.7-p330@SocialBlast/gems/oauth-0.4.4/lib/oauth/client/helper.rb:2:in `require'
from /Users/username/.rvm/gems/ruby-1.8.7-p330@SocialBlast/gems/oauth-0.4.4/lib/oauth/client/helper.rb:2
from /Users/username/.rvm/gems/ruby-1.8.7-p330@SocialBlast/gems/oauth-0.4.4/lib/oauth.rb:10:in `require'
from /Users/username/.rvm/gems/ruby-1.8.7-p330@SocialBlast/gems/oauth-0.4.4/lib/oauth.rb:10
from /Users/username/.rvm/gems/ruby-1.8.7-p330@SocialBlast/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:in `require'
from /Users/username/.rvm/gems/ruby-1.8.7-p330@SocialBlast/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:in `require'
from /Users/username/.rvm/gems/ruby-1.8.7-p330@SocialBlast/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in `each'
from /Users/username/.rvm/gems/ruby-1.8.7-p330@SocialBlast/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in `require'
from /Users/username/.rvm/gems/ruby-1.8.7-p330@SocialBlast/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:in `each'
from /Users/username/.rvm/gems/ruby-1.8.7-p330@SocialBlast/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:in `require'
from /Users/username/.rvm/gems/ruby-1.8.7-p330@SocialBlast/gems/bundler-1.0.10/lib/bundler.rb:120:in `require'
from /Users/username/rails_projects/socialblast/config/application.rb:7
from /Users/userna开发者_如何学运维me/.rvm/gems/ruby-1.8.7-p330@SocialBlast/gems/railties-3.0.5/lib/rails/commands.rb:28:in `require'
from /Users/username/.rvm/gems/ruby-1.8.7-p330@SocialBlast/gems/railties-3.0.5/lib/rails/commands.rb:28
from /Users/username/.rvm/gems/ruby-1.8.7-p330@SocialBlast/gems/railties-3.0.5/lib/rails/commands.rb:27:in `tap'
from /Users/username/.rvm/gems/ruby-1.8.7-p330@SocialBlast/gems/railties-3.0.5/lib/rails/commands.rb:27
from script/rails:6:in `require'
from script/rails:6
Gemfile
gem 'rails', '3.0.5'
gem 'sqlite3-ruby', '1.3.2', :require => 'sqlite3'
gem 'gravatar_image_tag', '0.1.0'
gem 'will_paginate', '3.0.pre2'
gem 'paperclip', "~> 2.3"
gem 'oauth', '~> 0.4.4'
gem 'twitter', '~> 1.1.2'
gem 'carmen'
gem 'aws-s3'
gem 'remotipart'
gem 'jquery-rails', '>= 0.2.6'
gem 'fb_graph', '>=1.4.0'
gem 'faker', '0.3.1'
gem 'rmagick', '2.12.2', :require => "RMagick"
gem 'yaml_db'
gem 'haml-rails'
gem 'compass', '~> 0.10.6'
gem 'yajl-ruby', '>= 0.7.6'
gem 'jruby-openssl'
I had this problem too... here's how I solved it (note that I'm using jruby too).
First check you have OpenSSL support with ruby -ropenssl -e OpenSSL
If any errors occur then you should try gem install jruby-openssl
Now here's the rough the bit: In /gems/jruby-openssl-0.7.3/lib/openssl.rb, I changed line 66 from require 'jopenssl'
to require 'openssl'
.
It looks like a bug in jruby-openssl :(
精彩评论