【问题标题】:What are my options if I have gems with conflicting dependencies?如果我有依赖冲突的 gem,我有什么选择?
【发布时间】:2011-06-14 15:24:04
【问题描述】:

我正在尝试使用 Mongoid 在 Padrino 中启动并运行示例项目。运行 bundle 时出现错误,因为 padrino 需要 3.0.8 的 activesupport,而 mongoid 需要 3.0.5。所以我 gem 安装了 3.0.5 并且我能够运行 bundle。但是现在当我尝试创建一个像

这样的新模型时
padrino g model post title:string body:text

我收到此错误

=> Problem loading ./config/boot.rb
=> You have already activated activesupport 3.0.8, but your 
Gemfile requires activesupport 3.0.5. Consider using bundle exec.

任何想法都会有所帮助。

【问题讨论】:

    标签: ruby rubygems bundle padrino


    【解决方案1】:

    升级 ruby​​gems,他们可能会允许它工作。

    【讨论】:

      【解决方案2】:

      目前bundler和Active*依赖也有点问题,所以强制为gem 'activesupport', '~>3.0.11', :require => 'active_support'

      【讨论】:

        猜你喜欢
        • 2015-09-12
        • 1970-01-01
        • 2013-07-07
        • 2023-01-14
        • 2019-10-26
        • 2021-04-11
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多