Installing Rails 4.2.0.beta1 - Unresolved dependency found during sorting

ぐ巨炮叔叔 提交于 2019-12-22 04:48:10

问题


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?


回答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.




回答2:


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.



来源:https://stackoverflow.com/questions/25438596/installing-rails-4-2-0-beta1-unresolved-dependency-found-during-sorting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!