0

I did 'bundle install' in my rails application. First I got following message:

Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    rails (= 3.0.1) ruby depends on
      bundler (~> 1.0.0) ruby

  Current Bundler version:
    bundler (1.3.4)

This Gemfile requires a different version of Bundler.

Then I find a thread here How to bundle install when your Gemfile requires an older version of bundler?

But after I '$ bundle 1.0.22 install', I got message like this:

/home/chinseone/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- rubygems/format (LoadError)
from /home/chinseone/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler/source.rb:5:in `<top (required)>'
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler/dsl.rb:14:in `initialize'
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler/dsl.rb:6:in `new'
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler/dsl.rb:6:in `evaluate'
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler/definition.rb:17:in `build'
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler.rb:138:in `definition'
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler/cli.rb:219:in `install'
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler/vendor/thor/task.rb:22:in `run'
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler/vendor/thor.rb:263:in `dispatch'
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler/vendor/thor/base.rb:386:in `start'
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/bin/bundle:13:in `<top (required)>'
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/bin/bundle:23:in `load'
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/bin/bundle:23:in `<main>'
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `eval'
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `<main>'

And the corresponding content is:

# If there are no unresolved deps, then we can use just try
# normal require handle loading a gem from the rescue below.

if Gem::Specification.unresolved_deps.empty? then
  return gem_original_require(path)
end

How to install and lock to the right version of bundler? Really appreciate!!

Community
  • 1
  • 1
chinseone
  • 11
  • 1

1 Answers1

-1

go to your Gemfile.lock change your bundle requirement