jetpack
jetpack copied to clipboard
LoadError: OpenSSL::SSL requires the jruby-openssl gem
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.
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.
Sadly this did not work. Thanks for the response though!
:( I'll try harder on the weekend.
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.
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.
@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 that did it for me too
@cchandler Thanks!
@cchandler +1. http worked for me too.
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?
@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?
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 .
thanks that worked.
I already have source 'http://rubygems.org' instead of 'https' in Gemfile, but I still get the same error
+1