rubygems - 从2.x升级到3.x时的Jekyll依赖错误

标签 rubygems jekyll jekyll-extensions

the official update guide之后,我最近从Jekyll 2.x升级到Jekyll 3.1.1。

安装后,运行jekyll serve会产生以下错误:

Dependency Error: Yikes! It looks like you don't have jekyll-markdown-block or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'Unable to activate jekyll-markdown-block-1.1.0, because jekyll-3.1.1 conflicts with jekyll (~> 2.0)' If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/!



因此,从那里我sudo gem update jekyll-markdown-block,但错误仍然存​​在。然后,我尝试更新所有我的 gem :
sudo gem update `gem list | cut -d ' ' -f 1`

然后出于绝望,卸载了我所有的 gem (除了核心之一,不允许我卸载):
sudo gem uninstall `gem list | cut -d ' ' -f 1`

然后,我像往常一样安装jekyll(假设我现在是在干净的地方工作):
sudo gem install jekyll
Fetching: liquid-3.0.6.gem (100%)
Successfully installed liquid-3.0.6
Fetching: kramdown-1.9.0.gem (100%)
Successfully installed kramdown-1.9.0
....
Parsing documentation for jekyll-watch-1.3.1
Installing ri documentation for jekyll-watch-1.3.1
Parsing documentation for jekyll-3.1.1
Installing ri documentation for jekyll-3.1.1
14 gems installed

然后安装jekyll-pressjekyll-markdown-block(新的错误消息提示我没有它们)之后,我收到了原始错误消息,提示Jekyll2.x。

如何完全删除Jekyll 2.x并完成升级,而又没有gem依赖项错误?

最佳答案

从2.x更新到jekylls 3.1.2之后,我遇到了同样的问题。
运行jekyll serve,我收到以下消息:

Dependency Error: Yikes! It looks like you don't have kramdown or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- kramdown' If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/!



我做了Virtua Creative关于他的评论的建议:
bundle install

然后:
bundle exec jekyll serve

最初的命令给了我同样的错误,但是bundle exec起作用了。

关于rubygems - 从2.x升级到3.x时的Jekyll依赖错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35167549/

相关文章:

ruby-on-rails - Rails 根据传入where条件的数组对记录进行排序

html - 如何在 jekyll 中添加脚本标签?

yaml - Jekyll config.yml 在解析 block 映射时没有找到预期的键

Jekyll - 获取目录中的所有文件夹并生成页面

jekyll - 如何按作者对帖子进行分页

jekyll - Octopress 无法使用代码块构建

ruby - 配置 i18n-tasks 丢失

ruby - 将 Rack-Jekyll 应用程序推送到 Heroku

用于 tmpdir 的 Ruby 2 gem OSX 粘性位

jekyll - 排除基于 JEKYLL_ENV 的文件?