jekyll gem reline版本冲突 [英] jekyll gem reline versions conflict

查看:190
本文介绍了jekyll gem reline版本冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用Jekyll创建一个网站.

I tried to create a website using Jekyll.

我用git clone复制了 jekyll-theme-hackcss , 然后按照 arch-wiki ruby​​gems页面中的说明进行操作,以获取正确的宝石包.

I used git clone to copy jekyll-theme-hackcss, and then followed instructions from the arch-wiki rubygems page to get the right gem packages.

从我使用的克隆文件夹内部:

From inside the cloned folder I used:

$ gem install jekyll
$ gem update
$ gem install bundler
$ bundle config path ~/.gem

/usr/lib/ruby/2.7.0/rubygems.rb:932: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
/home/my_user/.gem/ruby/2.7.0/gems/bundler-1.13.1/lib/bundler/rubygems_integration.rb:486: warning: in `eval'
WARN: Unresolved or ambiguous specs during Gem::Specification.reset:
   reline (>= 0)
   Available/installed versions of this gem:
   - 0.1.4
   - 0.1.3 
WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'
Please report a bug if this causes problems.

我想运行bundle exec jekyll serve以在本地运行服务器,而不会出现此错误.

My want to run bundle exec jekyll serve to run the server locally without having this error.

我按照错误消息的建议尝试了gem cleanup reline,但它说它可以正确清除,只是所描述的错误再次出现.

I tried gem cleanup reline as suggested by the error message but it says it's cleaning up correctly except that the error described comes back.

$ gem list                                                                                                                            

*** LOCAL GEMS ***

addressable (2.7.0)
benchmark (default: 0.1.0)
benchmark-ips (2.8.2)
bigdecimal (default: 2.0.0)
bundler (2.1.4, 1.13.1)
cgi (default: 0.1.0)
colorator (1.1.0)
concurrent-ruby (1.1.6)
csv (3.1.5, default: 3.1.2)
date (3.0.1, default: 3.0.0)
dbm (default: 1.1.0)
delegate (default: 0.1.0)
did_you_mean (default: 1.4.0)
em-websocket (0.5.1)
etc (default: 1.1.0)
eventmachine (1.2.7)
fcntl (default: 1.0.0)
ffi (1.13.1)
fiddle (default: 1.0.0)
fileutils (default: 1.4.1)
forwardable (default: 1.3.1)
forwardable-extended (2.6.0)
gdbm (default: 2.1.0)
getoptlong (default: 0.1.0)
http_parser.rb (0.6.0)
i18n (1.8.3)
io-console (default: 0.5.6)
ipaddr (default: 1.2.2)
jekyll (4.1.0)
jekyll-feed (0.13.0)
jekyll-sass-converter (2.1.0)
jekyll-seo-tag (2.6.1)
jekyll-watch (2.2.1)
json (default: 2.3.0)
kramdown (2.2.1)
kramdown-parser-gfm (1.1.0)
liquid (4.0.3)
listen (3.2.1)
logger (default: 1.4.2)
lolcat (100.0.1)
matrix (0.3.0, default: 0.2.0)
mercenary (0.4.0)
minima (2.5.1)
minitest (5.14.1)
mutex_m (default: 0.1.0)
net-pop (default: 0.1.0)
net-smtp (default: 0.1.0)
observer (default: 0.1.0)
open3 (default: 0.1.0)
openssl (2.2.0, default: 2.1.2)
optimist (3.0.1)
ostruct (default: 0.2.0)
paint (2.2.0)
pathutil (0.16.2)
prime (default: 0.1.1)
pstore (default: 0.1.0)
psych (default: 3.1.0)
public_suffix (4.0.5)
racc (1.5.0, default: 1.4.16)
rake-compiler (1.1.0)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
rdoc (6.2.1)
readline (default: 0.0.2)
readline-ext (default: 0.1.0)
reline (0.1.4, default: 0.1.3)
rexml (3.2.4, default: 3.2.3)
rouge (3.20.0)
rspec (3.9.0)
rspec-core (3.9.2)
rspec-expectations (3.9.2)
rspec-mocks (3.9.1)
rspec-support (3.9.3)
rss (0.2.9, default: 0.2.8)
safe_yaml (1.0.5)
sassc (2.4.0)
sdbm (default: 1.0.0)
singleton (default: 0.1.0)
stringio (default: 0.1.0)
strscan (default: 1.0.3)
sync (0.5.0)
term-ansicolor (1.7.1)
terminal-table (1.8.0)
thread_safe (0.3.6)
timeout (default: 0.1.0)
tins (1.25.0)
tracer (default: 0.1.0)
tzinfo (2.0.2, 1.2.7)
unicode-display_width (1.7.0)
uri (default: 0.10.0)
webrick (default: 1.6.0)
yaml (default: 0.1.0)
zlib (default: 1.1.0)

我的宝石环境是:

$ gem env

RubyGems Environment:
  - RUBYGEMS VERSION: 3.1.3
  - RUBY VERSION: 2.7.1 (2020-03-31 patchlevel 83) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/2.7.0
  - USER INSTALLATION DIRECTORY: /home/my_user/.gem/ruby/2.7.0
  - RUBY EXECUTABLE: /usr/bin/ruby
  - GIT EXECUTABLE: /usr/bin/git
  - EXECUTABLE DIRECTORY: /usr/bin
  - SPEC CACHE DIRECTORY: /home/my_user/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /usr/lib/ruby/gems/2.7.0
     - /home/my_user/.gem/ruby/2.7.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gem" => "--user-install"
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /home/my_user/bin
     - /home/my_user/.gem/ruby/2.7.0/bin
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/local/sbin
     - /opt/cuda/bin
     - /usr/lib/jvm/default/bin
     - /usr/bin/site_perl
     - /usr/bin/vendor_perl
     - /usr/bin/core_perl

出什么问题了?

推荐答案

这里可能有一个罪魁祸首,但是除非您解决基础方法,否则您将一遍又一遍地遇到这个问题.

There may be one culprit gem here but you will run into this problem again and again unless you fix your underlying approach.

看看您的宝石环境;无论您正在从事什么项目,所有的宝石都将安装到一个文件夹中.因此,如果您有两个项目的依赖项相互冲突,那么您将再次遇到此问题.

Look at your gems environment; all gems are installed into one folder, regardless of the project you’re working on. So, if you have two projects with conflicting dependencies you will get this problem again.

有些工具(例如RVM)可让您为每个项目创建环境.因此,如果您在一个项目中需要2.7,而在另一个项目中需要2.5,那么每个项目都有自己的宝石收藏,甚至还有不同版本的Ruby.

There are tools, like RVM, which let you create environments for each project. So, each project has its own separate collection of gems and even distinct versions of Ruby if you need 2.7 in one project and 2.5 for another.

请参见"在项目上设置Ruby版本管理器(RVM)的简便方法"有关如何使用RVM并为每个项目创建一个gemset的信息.

See "Easy way to setting Ruby Version Manager (RVM) on projects" for how to use RVM and create a gemset for each project.

这篇关于jekyll gem reline版本冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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