jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

LoadError: OpenSSL::SSL requires the jruby-openssl gem

Open solidline opened this issue 13 years ago • 15 comments

Created a new rails app rails new jetpack. Added the jetpack gem and config/jetpack.yml to the new rails application. Ran bundle exec jetpack . inside the rails app.

Resulted in the following:


LoadError: OpenSSL::SSL requires the jruby-openssl gem
                         (root) at file:/Users/tsanden/repos/jetpack/vendor/jruby.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/jruby/openssl/autoloads/ssl.rb:8
                            ssl at file:/Users/tsanden/repos/jetpack/vendor/jruby.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/jruby/openssl/autoloads/ssl.rb:451
                 connection_for at /Users/tsanden/repos/jetpack/vendor/bundler_gem/gems/bundler-1.1.rc/lib/bundler/vendor/net/http/persistent.rb:216
                        request at /Users/tsanden/repos/jetpack/vendor/bundler_gem/gems/bundler-1.1.rc/lib/bundler/vendor/net/http/persistent.rb:358
                          fetch at /Users/tsanden/repos/jetpack/vendor/bundler_gem/gems/bundler-1.1.rc/lib/bundler/fetcher.rb:135
  fetch_dependency_remote_specs at /Users/tsanden/repos/jetpack/vendor/bundler_gem/gems/bundler-1.1.rc/lib/bundler/fetcher.rb:160
             fetch_remote_specs at /Users/tsanden/repos/jetpack/vendor/bundler_gem/gems/bundler-1.1.rc/lib/bundler/fetcher.rb:122
                          specs at /Users/tsanden/repos/jetpack/vendor/bundler_gem/gems/bundler-1.1.rc/lib/bundler/fetcher.rb:70
                   remote_specs at /Users/tsanden/repos/jetpack/vendor/bundler_gem/gems/bundler-1.1.rc/lib/bundler/source.rb:230
                           each at org/jruby/RubyArray.java:1612


...

'cd . && PATH=$PATH:$(dirname $0) GEM_HOME="file:/Users/tsanden/repos/jetpack/vendor/jruby.jar!/META-INF/jruby.home/lib/ruby/gems/1.8" GEM_PATH="file:/Users/tsanden/repos/jetpack/vendor/jruby.jar!/META-INF/jruby.home/lib/ruby/gems/1.8:vendor/bundler_gem" exec java -Xmx2048m -jar vendor/jruby.jar --1.9  -e 'require "rubygems"; require "bundler"; require "bundler/cli"; cli=Bundler::CLI.new; cli.options={:deployment=>true}; cli.install'' failed.

I'm also using rbenv, not sure if this is causing issues.

solidline avatar Jan 27 '12 01:01 solidline

Try adding to your Gemfile

platform :jruby do
  gem 'jruby-openssl'
end

If that fixes, I'll add to the README as a requirement. Don't think we can add jruby only dependencies to a gem.

xaviershay avatar Jan 27 '12 05:01 xaviershay

Sadly this did not work. Thanks for the response though!

solidline avatar Jan 27 '12 17:01 solidline

:( I'll try harder on the weekend.

xaviershay avatar Jan 28 '12 04:01 xaviershay

Having the same issue while trying to play with Jetpack -- created a new Rails app for testing, added the jetpack gem to Gemfile, and configured jetpack.yml. Executed bundle exec jetpack . using on MRI (as referenced the README) Ruby 1.9.2 via RVM. Tried adding:

platform :jruby do
  gem 'jruby-openssl'
end

to the Gemfile ... still no joy.

cobrien avatar Feb 15 '12 02:02 cobrien

Oh so I think what you have to do is run bundler using JRuby at least once so that java becomes listed as a platform in your Gemfile.lock. If you only ever run it with MRI, it will never include jruby-openssl in the lock file.

xaviershay avatar Mar 02 '12 00:03 xaviershay

@sconover and I just encountered this problem internally. For us it was because the Gemfile specified a source of "https://rubygems.org" and as soon as we just used plain http it worked like a champ.

cchandler avatar Apr 28 '12 01:04 cchandler

@cchandler that did it for me too

mrgcohen avatar Jun 22 '12 18:06 mrgcohen

@cchandler Thanks!

jeberly avatar Jul 22 '12 02:07 jeberly

@cchandler +1. http worked for me too.

westonplatter avatar Sep 19 '12 05:09 westonplatter

Hi, I'm getting this issue also :)

I think I know the issue, but I'm still a bit confused. I'm using rvm with jruby 1.7.4, but the gem only loads jetpack when using MRI.

So I should create a new rvm layout using MRI and use that soley for the purposes of building? I guess people use this for production builds only and not for development b/c of the constant switching of rubies?

debugging avatar Jun 09 '13 17:06 debugging

@cchandler what do you mean 'just used plain http', my gemfile.lock has remote: https://rubygems.org/, what should I be doing to use http?

debugging avatar Jun 09 '13 17:06 debugging

top of Gemfile

source 'http://rubygems.org'

On Sun, Jun 9, 2013 at 1:56 PM, Salman Ahmed [email protected]:

@cchandler https://github.com/cchandler what do you mean 'just used plain http', my gemfile.lock has remote: https://rubygems.org/, what should I be doing to use http?

— Reply to this email directly or view it on GitHubhttps://github.com/square/jetpack/issues/2#issuecomment-19170341 .

mrgcohen avatar Jul 02 '13 20:07 mrgcohen

thanks that worked.

debugging avatar Jul 04 '13 04:07 debugging

I already have source 'http://rubygems.org' instead of 'https' in Gemfile, but I still get the same error

manish-m avatar Nov 21 '13 16:11 manish-m

+1

tsyber1an avatar Feb 25 '14 15:02 tsyber1an