2016-09-16 71 views
6

我在ubuntu 14.04 & ruby 2.2.4上安裝乘客+ nginx。有bundler錯誤與passenger-install-nginx-moduleBundler在ubuntu上使用passenger-install-nginx-module發生錯誤14.04

$passenger-install-nginx-module 
    /home/ubuntu/.rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/rubygems_ext.rb:45:in `full_gem_path': uninitialized constant Bundler::Plugin::API::Source (NameError) 
      from /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:144:in `block in full_require_paths' 
      from /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:143:in `map' 
      from /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:143:in `full_require_paths' 
      from /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:76:in `contains_requirable_file?' 
      from /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:949:in `block in find_in_unresolved' 
      from /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:949:in `each' 
      from /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:949:in `find_all' 
      from /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:949:in `find_in_unresolved' 
      from /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:74:in `require' 
      from /home/ubuntu/.rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/plugin/api/source.rb:2:in `<top (required)>' 
      from /home/ubuntu/.rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/rubygems_ext.rb:45:in `full_gem_path' 
      from /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:144:in `block in full_require_paths' 
      from /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:143:in `map' 
      from /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:143:in `full_require_paths' 
      from /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1370:in `add_self_to_load_path' 
      from /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1283:in `activate' 
      from /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:67:in `block in gem' 
      from /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:66:in `synchronize' 
      from /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:66:in `gem' 
      from /home/ubuntu/.rvm/gems/ruby-2.2.4/bin/passenger-install-nginx-module:22:in `<main>' 
      from /home/ubuntu/.rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `eval' 
      from /home/ubuntu/.rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `<main>' 

在此之前,gem passenger (v5.0.30)rails 4.2.0已經安裝完畢。什麼原因導致錯誤?

+2

嘗試使用'gem update bundler'更新您的打包程序。 –

+0

返回'無法更新'。捆綁版本是1.13.1,它是最新版本。 – user938363

+0

嘗試爲該用戶移除.rvm和.bundle文件並重新安裝導軌。它適用於我,幾個小時前我面臨同樣的錯誤 –

回答

5

檢查,如果你有RubyGems的正確版本

$ gem -v

2.6.5(或上級)


如果你還沒有,升級您的RubyGems:

$ gem update --system

如果您不能使用sudo這樣的:

$ sudo gem update --system


現在檢查你有最後的捆綁版本:

$ bundle -v

捆紮機版本1.13.0(或上級)


如果你還沒有,升級您的捆紮機:

$ gem install bundler