so I run:
$ gem install rails --version 3.0.1
Successfully installed rails-3.0.1
1 gem installed
Installing ri documentation for rails-3.0.1...
Installing RDoc documentation for rails-3.0.1...
then I get the error:
$ rails -v
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1637:in `raise_if_conflicts': Unable to activate rails-3.0.1, because bundler-1.1.4 conflicts with bundler (~> 1.0.0) (Gem::LoadError)
from /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:746:in `activate'
from /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems.rb:1232:in `gem'
from /usr/local/rvm/gems/ruby-1.9.3-p125@rails3tutorial/bin/rails:18:in `<main>'
from /usr/local/rvm/gems/ruby-1.9.3-p125@rails3tutorial/bin/ruby_noexec_wrapper:14:in `eval'
from /usr/local/rvm/gems/ruby-1.9.3-p125@rails3tutorial/bin/ruby_noexec_wrapper:14:in `<main>'
So Rails 3.0.1 requires Bundler v1.0.0
- v1.0.22
(actually any 1.0.x
version up to, but not including, 1.1.0), but you have a newer version of Bundler that's being loaded when Rails is started. You could uninstall the newer version(s) of Bundler (though this is a crappy way to deal with the issue) or since you're using RVM, just create a gemset for Rails 3.0.1.
$ rvm gemset create rails_3.0.1
$ rvm gemset use rails_3.0.1
$ gem install rails -v 3.0.1
$ rails -v
3.0.1
Note: this requires that Bundler not be in your global
gemset for the Ruby version you're trying to use. If the global
gemset contains a Bundler version equal to or higher than 1.1.0 then you'll get the same error as before.
Update: A little explanation about ~>
and RubyGems versioning might be handy. The section on pessimistic version constraint in the RubyGems docs does a fantastic job of covering everything.
You may need to update to bundler 1.1.4.
gem update bundler
should do the trick.
This is possibly due to Ruby v1.9.2/3 uses bundler v1.1.4 while Rails v3.0.1 requires bundler v~1.0.0. Hence, by simply updating the Rails version to v3.2.6, the conflict is solved. This conflict can be easily solved by matching the Ruby and Rails version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With