Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to downgrade bundler or upgrade rails?

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) 
like image 337
JohnHF Avatar asked Mar 15 '12 18:03

JohnHF


People also ask

How do I update my bundler?

The first step in upgrading to Bundler 2 is installing the Bundler 2 gem. To install it the usual way, run gem install bundler and RubyGems will install the latest version of Bundler.

How do I change the default bundler in Rails?

gem env – try to search in provided list under GEM PATHS, in specifications/default. remove there bundler-VERSION. gemspec. install bundler, if you don't have specific: gem install bundler:VERSION --default.

How do I uninstall bundler?

To uninstall Bundler, run gem uninstall bundler . See bundler.io for the full documentation.


2 Answers

Try the following commands:

gem uninstall bundler gem install bundler --version '1.0.0' 
like image 133
bruno077 Avatar answered Oct 04 '22 16:10

bruno077


To install downgraded version of bundler, try:

gem install bundler --version '<= 0.10.6' 

so you could have both version installed (check: gem list bundler/bundler _0.9.26_ -v), then run using that specific version, e.g.:

bundle _0.9.26_ install 

Learn more: How to upgrade/downgrade Rubygems at rubyforge

like image 20
kenorb Avatar answered Oct 04 '22 15:10

kenorb