How to downgrade bundler or upgrade rails?

JohnHF picture JohnHF · Mar 15, 2012 · Viewed 54.1k times · Source

I added omniauth gem to my gemfile and tried to run bundle install, but got a message about incompatibility of rails and bundler versions. I tried to update rails, but got messages about incompatibility with other gems. How can I downgrade bundler to 1.0?

$ bundle install
Fetching gem metadata from http://rubygems.org/......
Fetching gem metadata from http://rubygems.org/..
Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    rails (= 3.0.0) ruby depends on
      bundler (~> 1.0.0) ruby

  Current Bundler version:
    bundler (1.1.1)

This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?

and

$ bundle update rails
Fetching gem metadata from http://rubygems.org/......
Fetching gem metadata from http://rubygems.org/..
Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    factory_girl_rails (>= 0) ruby depends on
      bundler (~> 1.0.0) ruby

  Current Bundler version:
    bundler (1.1.1)

Answer

bruno077 picture bruno077 · Mar 15, 2012

Try the following commands:

gem uninstall bundler
gem install bundler --version '1.0.0'