Closed just3ws closed 13 years ago
This error is not specific to the rails3-devise-rspec-cucumber application template. You can verify this by trying another app template:
rails new myapp -m https://github.com/rubyx/rails3_template/raw/master/init.rb
which will likely fail in the same way (if it doesn't, please reopen this issue and I will investigate further).
I suggest asking for help on Stack Overflow: http://stackoverflow.com/questions/tagged/jruby
or the jRuby Google group: http://groups.google.com/group/jruby-users
I suspect there is a problem with jruby-openssl.
As a workaround, you can download the template directly and run it from your filesystem.
If you get more information, please post here again or email me so I provide information to other jRuby users who may run into the same problem.
-- Daniel
Thanks, I tried to reproduce the error and you are correct. It's definitely a JRuby OpenSSL problem.
I tried to generate the rails app using jruby-1.6.4, but ran into a certificate issue. I needed to install jruby-openssl, but that's not a big deal.
The problem appears to be there was a bad ssl certificate somewhere.
The offending error occurs within....
apply_rails_template at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/railties-3.1.0/lib/rails/generators/app_base.rb:109
I've inlined the entire stack trace....
OpenSSL::SSL::SSLError: certificate verify failed connect at org/jruby/ext/openssl/SSLSocket.java:179 connect at /Users/mdh/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/net/http.rb:586 do_start at /Users/mdh/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/net/http.rb:553 start at /Users/mdh/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/net/http.rb:542 open_http at /Users/mdh/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/open-uri.rb:242 buffer_open at /Users/mdh/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/open-uri.rb:616 open_loop at /Users/mdh/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/open-uri.rb:164 catch at org/jruby/RubyKernel.java:1191 open_loop at /Users/mdh/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/open-uri.rb:162 open_uri at /Users/mdh/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/open-uri.rb:132 open at /Users/mdh/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/open-uri.rb:518 open at /Users/mdh/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/open-uri.rb:30 apply at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/thor-0.14.6/lib/thor/actions.rb:212 apply_rails_template at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/railties-3.1.0/lib/rails/generators/app_base.rb:109 apply_rails_template at (eval):1 send at org/jruby/RubyKernel.java:2092 run at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/thor-0.14.6/lib/thor/task.rb:21 invoke_task at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/thor-0.14.6/lib/thor/invocation.rb:118 invoke_all at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/thor-0.14.6/lib/thor/invocation.rb:124 each at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/thor-0.14.6/lib/thor/core_ext/ordered_hash.rb:75 collect at org/jruby/RubyEnumerable.java:706 invoke_all at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/thor-0.14.6/lib/thor/invocation.rb:124 dispatch at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/thor-0.14.6/lib/thor/group.rb:226 start at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/thor-0.14.6/lib/thor/base.rb:389 (root) at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/railties-3.1.0/lib/rails/commands/application.rb:31 require at org/jruby/RubyKernel.java:1038 require at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/railties-3.1.0/lib/rails/commands/application.rb:29 (root) at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/railties-3.1.0/lib/rails/cli.rb:15 require at org/jruby/RubyKernel.java:1038 require at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/railties-3.1.0/lib/rails/cli.rb:29 (root) at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/rails-3.1.0/bin/rails:7 load at org/jruby/RubyKernel.java:1063 (root) at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/bin/rails:19
Here are the full set of steps to reproduce the issue.....
09:49:36 mdh@just3ws-groupon:~/src/scratch jruby-1.6.4@APP_NAME ☱ gem list -a
09:49:39 mdh@just3ws-groupon:~/src/scratch jruby-1.6.4@APP_NAME ☱ gem install rails bundler Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported = 1.8.7 : gem install rdoc-data; rdoc-data --install = 1.9.1 : gem install rdoc-data; rdoc-data --install
JRuby limited openssl loaded. http://jruby.org/openssl gem install jruby-openssl for full support. The template [https://github.com/RailsApps/rails3-application-templates/raw/master/rails3-devise-rspec-cucumber-template.rb] could not be loaded. Error: OpenSSL::SSL requires the jruby-openssl gem 09:49:59 mdh@just3ws-groupon:~/src/scratch jruby-1.6.4@APP_NAME ☱ gem install jruby-openssl Successfully installed bouncy-castle-java-1.5.0146.1 Successfully installed jruby-openssl-0.7.4 2 gems installed 09:50:09 mdh@just3ws-groupon:~/src/scratch jruby-1.6.4@APP_NAME ☱ rails new APP_NAME -m https://github.com/RailsApps/rails3-application-templates/raw/master/rails3-devise-rspec-cucumber-template.rb -T exist
identical README identical Rakefile identical config.ru identical .gitignore identical Gemfile exist app identical app/assets/images/rails.png identical app/assets/javascripts/application.js identical app/assets/stylesheets/application.css identical app/controllers/application_controller.rb identical app/helpers/application_helper.rb exist app/mailers exist app/models identical app/views/layouts/application.html.erb identical app/mailers/.gitkeep identical app/models/.gitkeep exist config identical config/routes.rb identical config/application.rb identical config/environment.rb exist config/environments identical config/environments/development.rb identical config/environments/production.rb identical config/environments/test.rb exist config/initializers identical config/initializers/backtrace_silencers.rb identical config/initializers/inflections.rb identical config/initializers/mime_types.rb conflict config/initializers/secret_token.rb Overwrite /Users/mdh/src/scratch/APP_NAME/config/initializers/secret_token.rb? (enter "h" for help) [Ynaqdh] Y force config/initializers/secret_token.rb identical config/initializers/session_store.rb identical config/initializers/wrap_parameters.rb exist config/locales identical config/locales/en.yml identical config/boot.rb identical config/database.yml exist db identical db/seeds.rb exist doc identical doc/README_FOR_APP exist lib exist lib/tasks identical lib/tasks/.gitkeep exist lib/assets identical lib/assets/.gitkeep exist log identical log/.gitkeep exist public identical public/404.html identical public/422.html identical public/500.html identical public/favicon.ico identical public/index.html identical public/robots.txt exist script identical script/rails exist tmp/cache exist tmp/cache/assets exist vendor/assets/stylesheets identical vendor/assets/stylesheets/.gitkeep exist vendor/plugins identical vendor/plugins/.gitkeep apply https://github.com/RailsApps/rails3-application-templates/raw/master/rails3-devise-rspec-cucumber-template.rb OpenSSL::SSL::SSLError: certificate verify failed connect at org/jruby/ext/openssl/SSLSocket.java:179 connect at /Users/mdh/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/net/http.rb:586 do_start at /Users/mdh/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/net/http.rb:553 start at /Users/mdh/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/net/http.rb:542 open_http at /Users/mdh/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/open-uri.rb:242 buffer_open at /Users/mdh/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/open-uri.rb:616 open_loop at /Users/mdh/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/open-uri.rb:164 catch at org/jruby/RubyKernel.java:1191 open_loop at /Users/mdh/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/open-uri.rb:162 open_uri at /Users/mdh/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/open-uri.rb:132 open at /Users/mdh/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/open-uri.rb:518 open at /Users/mdh/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/open-uri.rb:30 apply at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/thor-0.14.6/lib/thor/actions.rb:212 apply_rails_template at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/railties-3.1.0/lib/rails/generators/app_base.rb:109 apply_rails_template at (eval):1 send at org/jruby/RubyKernel.java:2092 run at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/thor-0.14.6/lib/thor/task.rb:21 invoke_task at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/thor-0.14.6/lib/thor/invocation.rb:118 invoke_all at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/thor-0.14.6/lib/thor/invocation.rb:124 each at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/thor-0.14.6/lib/thor/core_ext/ordered_hash.rb:75 collect at org/jruby/RubyEnumerable.java:706 invoke_all at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/thor-0.14.6/lib/thor/invocation.rb:124 dispatch at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/thor-0.14.6/lib/thor/group.rb:226 start at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/thor-0.14.6/lib/thor/base.rb:389 (root) at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/railties-3.1.0/lib/rails/commands/application.rb:31 require at org/jruby/RubyKernel.java:1038 require at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/railties-3.1.0/lib/rails/commands/application.rb:29 (root) at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/railties-3.1.0/lib/rails/cli.rb:15 require at org/jruby/RubyKernel.java:1038 require at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/railties-3.1.0/lib/rails/cli.rb:29 (root) at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/gems/rails-3.1.0/bin/rails:7 load at org/jruby/RubyKernel.java:1063 (root) at /Users/mdh/.rvm/gems/jruby-1.6.4@APP_NAME/bin/rails:19 09:50:16 mdh@just3ws-groupon:~/src/scratch jruby-1.6.4@APP_NAME ☱