I've attempted to install Rails 4.2.0.beta1 (released Aug 20, 2014). I get an error "Unresolved dependency found during sorting." Here are the details:
$ ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
$ gem -v
2.4.1
$ gem install rails --pre
ERROR: While executing gem ... (Gem::DependencyError)
Unresolved dependency found during sorting - activesupport (>= 4.0)
(requested by sprockets-rails-3.0.0.beta1)
How can I install Rails 4.2.0.beta1?
You are using RubyGems 2.4.1:
$ gem -v
2.4.1
there's a bug with the newest 2.4.1 release of RubyGems (the system gem) that makes it difficult to install Rails 4.2.0.beta1. See Rails issue 16609.
You can work around the problem by downgrading to the 2.2.2 version of RubyGems.
$ gem update --system 2.2.2
Updating rubygems-update
Fetching: rubygems-update-2.2.2.gem (100%)
Successfully installed rubygems-update-2.2.2
Installing RubyGems 2.2.2
RubyGems 2.2.2 installed
Now you will be able to install Rails 4.2.0.beta1.
If you are using RVM, and you want to use two different versions of the RubyGems system gem, you'll need to install two different versions of the latest Ruby 2.1.2 release with different RVM names. For example, if you already have Ruby 2.1.2 installed with the newest RubyGems 2.4.1, you can install another version of Ruby 2.1.2, giving it a different name:
$ rvm install ruby-2.1.2-oldrubygem
RubyGems 2.2.2 is installed by default with the current Ruby 2.1.2 release:
$ ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
$ gem -v
2.2.2
You'll be able to install Rails 4.2.0.beta1.
This issue has been fixed on RubyGems. Upgrade to at least 2.4.4
Have a look at this GitHub issue for more information.
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