Installing Rails 4.2.0.beta1 - Unresolved dependency found during sorting
Asked Answered
L

2

7

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?

Lani answered 22/8, 2014 at 2:7 Comment(0)
D
1

This issue has been fixed on RubyGems. Upgrade to at least 2.4.4

Have a look at this GitHub issue for more information.

Deadpan answered 2/12, 2014 at 5:55 Comment(0)
L
12

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.

Lani answered 22/8, 2014 at 2:7 Comment(3)
I've had rubygems 2.2.2. And the issue was the same.Redeem
Actually my issue is different. #25474635Redeem
Issue is now fixed by RubyGems 2.4.4. Please see other answer to this question.Klutz
D
1

This issue has been fixed on RubyGems. Upgrade to at least 2.4.4

Have a look at this GitHub issue for more information.

Deadpan answered 2/12, 2014 at 5:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.