【问题标题】:Mongoid error/conflict with Bundle Install (RoR) using the gem from Github使用 Github 中的 gem 与 Bundle Install (RoR) 发生 Mongoid 错误/冲突
【发布时间】:2014-01-03 09:55:46
【问题描述】:

我正在使用来自 Github 的 Ruby 2.0.0 + RoR4.0.2 + Mongoid 4 gem:

宝石文件:

gem "moped", github: "mongoid/moped"
gem "mongoid", github: "mongoid/mongoid"

错误:

Git 错误:命令git clone --no-checkout "/Users/skozz/wwwssd/railsapps/research/vendor/bundle/cache/bundler/git/moped-9b1aedab11453ea81518d1ac845eab1f786d7c14" "/Users/skozz/wwwssd/railsapps/research/vendor/bundle/bundler/gems/moped-a8f96c57042a" 在目录 /Users/skozz/wwwssd/railsapps/research 中失败了。如果 此错误仍然存​​在您可以尝试删除缓存目录 '/Users/skozz/wwwssd/railsapps/research/vendor/bundle/cache/bundler/git/moped-9b1aedab11453ea81518d1ac845eab1f786d7c14'

我可以解决删除缓存目录的问题,但是这个问题每天都在发生,当它发生在 Heroku 的生产环境中时,我感到很困扰。

如何自动避免这种冲突?

谢谢。

【问题讨论】:

    标签: ruby-on-rails mongodb ruby-on-rails-4 mongoid


    【解决方案1】:

    如果这不起作用,您可以在 Gemfile 中尝试此操作

    gem 'mongoid', :git => 'https://github.com/mongoid/mongoid.git'

    这对我有用。

    【讨论】:

      【解决方案2】:

      我解决了它,指定了完整的 Github 路径

      发件人:

      gem "moped", github: "mongoid/moped"
      gem "mongoid", github: "mongoid/mongoid"
      

      收件人:

      gem "mongoid",  :git => 'git://github.com/mongoid/mongoid.git'
      gem "moped",  :git => 'git://github.com/mongoid/moped.git'
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2012-02-17
        • 1970-01-01
        • 2012-04-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多