Jekyll /宝石:未解决的规格 [英] Jekyll / gem: Unresolved specs

查看:136
本文介绍了Jekyll /宝石:未解决的规格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Jekyll,我有两个独立的存储库,我想我最近更新了一个。上次我提交博客时,一切正常。现在只是这样:

  $ jekyll serve --watch 
WARN:Gem :: Specification.reset期间未解决的规格:
redcarpet(〜> 3.1)
jekyll-watch(〜> 1.1)
classifier-reborn(〜> 2.0)
WARN:清除未解析的规格。
如果这导致问题,请报告错误。
/var/lib/gems/2.1.0/gems/jekyll-2.5.2/bin/jekyll:21:in`block in< top(required)>':无法加载这样的文件 - jekyll / version(LoadError)从/var/lib/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary.rb:18:从程序$ b $ /从/ var / lib获取(LoadError)
/gems/2.1.0/gems/jekyll-2.5.2/bin/jekyll:20:in`< top(required)>'从/ usr / local / bin / jekyll获取
:23:在`在`< main>'


$ b $中加载'
from / usr / local / bin / jekyll:23: b

到底发生了什么?看起来杰基尔或宝石自杀。我该如何解决这个问题?



我怎样才能防止Jekyll或Ruby搞乱全局安装(我认为这就是发生的事情 - 这两个博客并不是独立的彼此)?我可以确保每个Jekyll目录与另一个Jekyll目录是隔离的吗?比如在任何下降的编程语言/编译系统中?




修改。我随机运行 sudo gem cleanup&&捆绑安装。这似乎已经卸载(!?!)所有宝石,然后重新安装它们。现在我得到一个不同的错误:

  WARN:Gem :: Specification.reset期间未解析的规格:
listen(〜 > 2.7)
WARN:清除未解决的规格。
如果这导致问题,请报告错误。

我是否有权假定gem / bundle不知道传递依赖是什么?

  $ bundle show listen 
/var/lib/gems/2.1.0/gems/listen-2.7.11

所以监听。那么,为什么杰基尔会抱怨呢?

解决方案

看来你并不是唯一有这种问题的人。 在此处查看问题



我设法绕过这个问题的方式有两种。

在Jekyll 2.5.x上,删除 Gemfile 消失。



如果需要Gemfile, bundle exec jekyll serve 就可以。


I am using Jekyll, I have two independent repositories, and I think I updated one recently. Everything was working fine last time I rendered my blog. Now just this:

$ jekyll serve --watch
WARN: Unresolved specs during Gem::Specification.reset:
      redcarpet (~> 3.1)
      jekyll-watch (~> 1.1)
      classifier-reborn (~> 2.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/var/lib/gems/2.1.0/gems/jekyll-2.5.2/bin/jekyll:21:in `block in <top (required)>': cannot load such file -- jekyll/version (LoadError)
    from /var/lib/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary.rb:18:in `program'
    from /var/lib/gems/2.1.0/gems/jekyll-2.5.2/bin/jekyll:20:in `<top (required)>'
    from /usr/local/bin/jekyll:23:in `load'
    from /usr/local/bin/jekyll:23:in `<main>'

What the heck is going on? It seems Jekyll or Gem killed itself. How can I fix this?

How can I prevent that Jekyll or Ruby is messing around with the global install (I think that's what's happening-the two blogs are not independent of each other)? Can I ensure that each Jekyll directory is isolated from another, like in any descent programming language / build system?


Edit. I randomly ran sudo gem cleanup && bundle install. This seems to have uninstalled (!?!) all the gems, then re-installed them. Now I get a different error:

WARN: Unresolved specs during Gem::Specification.reset:
      listen (~> 2.7)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.

Am I right to assume that gem/bundle has no idea what a transitive dependency is?

$ bundle show listen
/var/lib/gems/2.1.0/gems/listen-2.7.11

So there is listen. So why does Jekyll complain?

解决方案

It seems that you're not the only one to have this kind of problem. See issue here.

I managed to bypass this problem in two ways.

On Jekyll 2.5.x, removing Gemfile simply make the error disappear.

If Gemfile is needed, a bundle exec jekyll serve is ok.

这篇关于Jekyll /宝石:未解决的规格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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