Gem :: LoadError:无法激活jruby-openssl-0.9.6-java,已激活jruby-openssl-0.9.5-java

时间:2015-01-09 13:28:59

标签: ruby-on-rails openssl capistrano jruby torquebox

当我尝试在Centos 6 VPS上部署Rails 4.1.9应用程序时出现以下错误:

** [out :: IP] Gem::LoadError: can't activate jruby-openssl-0.9.6-java, already activated jruby-openssl-0.9.5-java
 ** [out :: IP] raise_if_conflicts at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/shared/rubygems/specification.rb:1988
 ** [out :: IP] activate at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/shared/rubygems/specification.rb:1238
 ** [out :: IP] gem at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/shared/rubygems/core_ext/kernel_gem.rb:48
 ** [out :: IP] require at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:46
 ** [out :: IP] (root) at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/shared/rubygems/security.rb:11
 ** [out :: IP] require at org/jruby/RubyKernel.java:1065
 ** [out :: IP] require at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
 ** [out :: IP] require at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53
 ** [out :: IP] (root) at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/shared/rubygems/package.rb:1
 ** [out :: IP] require at org/jruby/RubyKernel.java:1065
 ** [out :: IP] require at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
 ** [out :: IP] require at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53
 ** [out :: IP] (root) at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/shared/rubygems/package.rb:43
 ** [out :: IP] require at org/jruby/RubyKernel.java:1065
 ** [out :: IP] require at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
 ** [out :: IP] require at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53
 ** [out :: IP] (root) at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/shared/rubygems/dependency_installer.rb:1
 ** [out :: IP] (root) at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/shared/rubygems/dependency_installer.rb:4
 ** [out :: IP] (root) at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/gems/shared/gems/bundler-1.7.11/lib/bundler/installer.rb:1
 ** [out :: IP] (root) at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/gems/shared/gems/bundler-1.7.11/lib/bundler/installer.rb:2
 ** [out :: IP] (root) at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/gems/shared/gems/bundler-1.7.11/lib/bundler/cli/install.rb:1
 ** [out :: IP] run at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/gems/shared/gems/bundler-1.7.11/lib/bundler/cli/install.rb:79
 ** [out :: IP] install at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/gems/shared/gems/bundler-1.7.11/lib/bundler/cli.rb:145
 ** [out :: IP] run at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/gems/shared/gems/bundler-1.7.11/lib/bundler/vendor/thor/command.rb:27
 ** [out :: IP] invoke_command at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/gems/shared/gems/bundler-1.7.11/lib/bundler/vendor/thor/invocation.rb:121
 ** [out :: IP] dispatch at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/gems/shared/gems/bundler-1.7.11/lib/bundler/vendor/thor.rb:363
 ** [out :: IP] start at /home/user/.rbenv/versions/jruby-1.7.16/lib/ruby/gems/shared/gems/bundler-1.7.11/lib/bundler/vendor/thor/base.rb:440
 ** [out :: IP] load at org/jruby/RubyKernel.java:1081
 ** [out :: IP] (root) at /home/user/.rbenv/versions/jruby-1.7.16/bin/bundle:23
    command finished in 10235ms
*** [deploy:update_code] rolling back

我的Gemfile:

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.9'
# Use jdbcpostgresql as the database for Active Record
gem 'activerecord-jdbcpostgresql-adapter'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.4'
gem 'compass-rails'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyrhino'
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0',                                 group: :doc

gem 'devise'
gem 'carrierwave'
gem 'mini_magick','3.8.1'
gem 'acts_as_api'
gem 'awesome_nested_set'
gem 'friendly_id'
gem 'kaminari'
gem 'ransack'
gem 'nokogiri','1.6.1'
gem 'httparty'

# gem 'warbler'
gem 'torquebox'
# gem 'dotenv-rails'

gem 'capistrano', '~> 2.15.5', group: :development
gem 'torquebox-capistrano-support', group: :development

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

尝试jruby-1.7.15,jruby-1.7.18,同样的事情发生了。 当capistrano尝试在发布路径中运行“bundle install”时,会出现错误。 我的Gemfile中没有jruby-openssl,因为据我所知它不是必需的。

知道为什么会这样,尤其是如何解决它?

1 个答案:

答案 0 :(得分:0)

你可以试试这个

Gemfile中的

gem 'jruby-openssl', '0.9.5'

然后删除Gemfile.lock

然后

bundle install