捆绑安装问题

时间:2015-12-16 12:25:19

标签: ruby-on-rails ruby bundler

我正在尝试运行一个旧项目,但我遇到了问题。我正在使用:

  • Ruby - 1.9.3
  • Rails - 3.0.20

安装宝石时出现以下错误。我该如何安装这些宝石?

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)

2 个答案:

答案 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宝石版本。