Bundler error with passenger-install-nginx-module on ubuntu 14.04
Asked Answered
O

2

6

I am installing passenger + nginx on ubuntu 14.04 & ruby 2.2.4. There are bundler errors with passenger-install-nginx-module

  $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>'

Before that, gem passenger (v5.0.30) and rails 4.2.0 have been installed. What causes the error?

Oxalis answered 16/9, 2016 at 10:13 Comment(4)
try updating your bundler using gem update bundlerAutoclave
Returns Nothing to update. bundler version is 1.13.1 and it is the latest version.Oxalis
Try to remove .rvm and .bundle files for this user and reinstall rails. It works for me, few hours ago I was facing same errorLaager
After removing gem rails, then passenger-install-nginx-module starts to work. Odd, isn't it?Oxalis
S
9

Had the same problem,

What I did:

gem uninstall bundler -v1.13.1

(or gem uninstall bundler -v1.13)

Then

gem install bundler -v 1.12

Then passenger-install-apache2-module works.


Suggestions here:

Sanches answered 20/9, 2016 at 20:30 Comment(0)
X
5

Check if you have the right version of RubyGems

$ gem -v

2.6.5 (or superior)


If you have not, upgrade your RubyGems:

$ gem update --system

If you can't use sudo like this:

$ sudo gem update --system


Now check you have the last bundler version:

$ bundle -v

Bundler version 1.13.0 (or superior)


If you have not, upgrade your Bundler:

$ gem install bundler

Xanthochroism answered 5/10, 2016 at 9:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.