我正在尝试运行一个旧项目,但我遇到了问题。我正在使用:
安装宝石时出现以下错误。我该如何安装这些宝石?
Resolving dependencies...................................................................................................................
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
active_form was resolved to 1.0.4, which depends on
activesupport (>= 3.0.0)
active_form was resolved to 1.0.4, which depends on
activesupport (>= 3.0.0)
paper_trail (~> 3.0.1) was resolved to 3.0.9, which depends on
activesupport (< 5.0, >= 3.0)
paperclip was resolved to 4.3.1, which depends on
activesupport (>= 3.2.0)
rails (= 3.0.20) was resolved to 3.0.20, which depends on
activesupport (= 3.0.20)
rails (= 3.0.20) was resolved to 3.0.20, which depends on
activesupport (= 3.0.20)
rails (= 3.0.20) was resolved to 3.0.20, which depends on
activesupport (= 3.0.20)
rails (= 3.0.20) was resolved to 3.0.20, which depends on
activesupport (= 3.0.20)
rails (= 3.0.20) was resolved to 3.0.20, which depends on
activesupport (= 3.0.20)
rspec-rails (~> 2.14.0) was resolved to 2.14.2, which depends on
activesupport (>= 3.0)
答案 0 :(得分:2)
如果您仔细阅读说明,那么问题就在哪里。
paperclip was resolved to 4.3.1, which depends on
activesupport (>= 3.2.0)
这个特定的gem要求activesupport
版本至少为3.2,但你的项目有Rails(因此activesupport
)冻结在3.0.20。
您需要使用与旧版Rails兼容的paperclip
版本。修改您的Gemfile
并指定较早的paperclip
版本。
您可以查看paperclip dependencies on RubyGems并选择正确的版本。
答案 1 :(得分:0)
您应该减少paperclip
宝石版本。