【问题标题】:Bundle installation error; active support捆绑安装错误;积极支持
【发布时间】:2017-04-22 04:10:27
【问题描述】:

捆绑过程中似乎出现了一些错误! bundle install

后似乎出现以下消息
C:\Users\Nir\Desktop\my projects\projectmeal>bundle install
    Fetching gem metadata from https://rubygems.org/............
    Fetching version metadata from https://rubygems.org/...
    Fetching dependency metadata from https://rubygems.org/..
    Resolving dependencies...........................
    Bundler could not find compatible versions for gem "activesupport":
      In snapshot (Gemfile.lock):
        activesupport (= 5.0.0.1)

      In Gemfile:
        carrierwave x86-mingw32 was resolved to 0.11.2, which depends on
          activesupport (>= 3.2.0) x86-mingw32

    easy_rails_money (~> 0.0.8) x86-mingw32 was resolved to 0.0.8, which depends
    on
          activesupport (~> 3.2) x86-mingw32

        elasticsearch-model x86-mingw32 was resolved to 0.1.9, which depends on
          activesupport (> 3) x86-mingw32

        factory_girl_rails x86-mingw32 was resolved to 4.7.0, which depends on
    factory_girl (~> 4.7.0) x86-mingw32 was resolved to 4.7.0, which depends
    on
            activesupport (>= 3.0.0) x86-mingw32

        factory_girl_rails x86-mingw32 was resolved to 4.7.0, which depends on
    factory_girl (~> 4.7.0) x86-mingw32 was resolved to 4.7.0, which depends
    on
            activesupport (>= 3.0.0) x86-mingw32

        rspec-rails x86-mingw32 was resolved to 3.5.2, which depends on
          activesupport (>= 3.0) x86-mingw32

    Running `bundle update` will rebuild your snapshot from scratch, using only
    the gems in your Gemfile, which may resolve the conflict.

当我尝试运行诸如 rake db:create 之类的 rails 命令时,在终端中会出现以下错误

C:\Users\Nir\Desktop\my projects\projectmeal>rake db:create
Could not find gem 'guard-rspec x86-mingw32' in any of the gem sources listed in
 your Gemfile or available on this machine.
Run `bundle install` to install missing gems.

这个过程还在继续.....

【问题讨论】:

  • 您是通过什么方式安装 ruby​​ 的? rvm?
  • 您尝试更新 rails 了吗? Check out this solution
  • 看起来像依赖错误。
  • @gates 不,我没有使用任何 rvm 来安装 ruby​​...
  • @nuaky 谢谢兄弟。我一定会检查的!

标签: ruby-on-rails rubygems bundle-install


【解决方案1】:

如果 bundle 说它找不到兼容的 gem 版本,那可能是因为它无处可寻。您正在给它版本号,即强制它为每个 gem 采用某些版本,或者优于 X 或低于 X 的版本。

而不是:

  gem 'activesupport'

试试:

gem 'activesupport', '3.2.0'

【讨论】:

  • 在安装包之前删除你的 Gemfile.lock
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2013-12-14
  • 2017-02-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-09-05
相关资源
最近更新 更多