使用旧的rubygems版本进行捆绑安装 [英] bundle install using old rubygems version

查看:127
本文介绍了使用旧的rubygems版本进行捆绑安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看起来是在 1个月的问题,没有人触及。我使用homebrew安装了rbenv,使用 rbenv install 2.3.1安装了ruby 2.3.1,使用安装了jekyll和bundler,gem install jekyll gem install bundler ,然后在一个jekyll项目中,我键入 bundle install 。我得到错误 Rubygems 2.0.14.1不是线程安全的,因此您的宝石将一次安装一个。升级到Rubygems 2.1.0或更高版本以启用并行gem安装。运行 gem env 时,我看到:

I'm having what appears to be the exact same problem seen in a 1-month old question that no one has touched. I installed rbenv using homebrew, installed ruby 2.3.1 using rbenv install 2.3.1, installed jekyll and bundler using gem install jekyll and gem install bundler, then within a jekyll project, I typed bundle install. I got the error Rubygems 2.0.14.1 is not threadsafe, so your gems will be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation. When I run gem env, I see this:

RubyGems Environment:
  - RUBYGEMS VERSION: 2.6.6
  - RUBY VERSION: 2.3.1 (2016-04-26 patchlevel 112) [x86_64-darwin15]
  - INSTALLATION DIRECTORY: /Users/lindsb/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0
  - USER INSTALLATION DIRECTORY: /Users/lindsb/.gem/ruby/2.3.0
  - RUBY EXECUTABLE: /Users/lindsb/.rbenv/versions/2.3.1/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/lindsb/.rbenv/versions/2.3.1/bin
  - SPEC CACHE DIRECTORY: /Users/lindsb/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /Users/lindsb/.rbenv/versions/2.3.1/etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-15
  - GEM PATHS:
     - /Users/lindsb/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0
     - /Users/lindsb/.gem/ruby/2.3.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /Users/lindsb/.rbenv/versions/2.3.1/bin
     - /usr/local/Cellar/rbenv/1.0.0/libexec
     - /Users/lindsb/.local/bin
     - /usr/local/sbin
     - /usr/local/bin
     - /Users/lindsb/.rbenv/shims
     - /Users/lindsb/.local/bin
     - /usr/local/sbin
     - /usr/local/bin
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
     - /opt/X11/bin
     - /Library/TeX/texbin

I不明白为什么当我的Rubygems版本是2.6.6时,bundler抱怨Rubygems低于2.1.0。
项目目录中有一个 Gemfile 和一个 Gemfile.lock Gemfile 看起来像这样:

I don't understand why bundler complains about Rubygems being below 2.1.0 when my Rubygems version is 2.6.6. There is a Gemfile and a Gemfile.lock in the project directory. Gemfile looks like this:

source 'https://rubygems.org'                                                      

# jekyll                                                                           
gem "jekyll", "3.1.1"                                                              
gem "redcarpet"                                                                    

# compiling less                                                                   
gem 'therubyracer'                                                                 
gem 'less'                                                                         

# minifying                                                                        
gem 'jekyll-press'                                                                 

# octokit                                                                          
gem 'octokit'                                                                      
gem 'netrc'


推荐答案

I不知道究竟是什么问题,但是当我删除 Gemfile.lock 和reran bundle install 一切正常。在 Gemfile.lock 中可能只有一些错误的约束或其他内容。

I don't know exactly what the issue was, but when I removed Gemfile.lock and reran bundle install everything worked fine. There were probably just some bad constraints or something in Gemfile.lock.

这篇关于使用旧的rubygems版本进行捆绑安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆