本文介绍了使用jekyll-multiple-languages-plugin运行Jekyll时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 <$ c $我试图在Windows上使用jekyll-multiple-languages-plugin运行Jekyll服务器,但我一直收到这个错误消息: c> C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in'require':无法加载这个文件 -  jekyll-multiple-languages-plugin(LoadError)
从C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:在'require'
从C:/Ruby200/lib/ruby/gems/2.0.0/gems/ jekyll-2.0.3 / lib / jekyll / plugin_manager.rb:28:在`block in require_gems'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/ lib / jekyll / plugin_manager.rb:26:C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/lib/jekyll/plugin_manager.rb中的`each'
: 26:在`require_gems'中
从C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/lib/jekyll/plugin_manager.rb:19:在`conscientious_require'$ b $ c from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/lib/jekyll/site.rb:71:在`setup'中
从C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/lib/jekyll/site.rb:33:在`初始化'
从C:/ Ruby200 / lib / ruby / gems / 2.0.0 / gems / jekyll-2.0.3 / lib / jekyll / commands / build.rb:26:在C:/Ruby200/lib/ruby/gems/2.0的`new'
中。 0 / gems / jekyll-2.0.3 / lib / jekyll / commands / build.rb:26:在`process'
从C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll- 2.0.3 / lib / jekyll / commands / serve.rb:23:在init_with_program的`block(2 levels)'从C:/Ruby200/lib/ruby/gems/2.0.0/gems/mercenary- 0.3.3 / lib / mercenary / command.rb:220:在`call'中
从C:/Ruby200/lib/ruby/gems/2.0.0/gems/mercenary-0.3.3/lib/mercenary/ command.rb:220:在`block in execute'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/mercenary-0.3.3/lib/mercenary/command.rb:220:在`each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/mercenary-0.3.3/lib/mercenary/command.rb:220:在`execute'
从C:/Ruby200/lib/ruby/gems/2.0.0/gems/mercenary-0.3.3/lib/mer cenary / program.rb:35:在'去'
从C:/Ruby200/lib/ruby/gems/2.0.0/gems/mercenary-0.3.3/lib/mercenary.rb:22:在`程序'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/bin/jekyll:18:在``
from C:/ Ruby200 / bin / jekyll:23:在`load'
从C:/ Ruby200 / bin / jekyll:23:在`'

我在 _config.yml 中添加了以下内容:

gems:
- jekyll-multiple-languages-plugin



这是我的宝石文件列表:

  ***本地GEMS *** 

activesupport(4.1.1)
bigdecimal(1.2.0)
blankslate (2.1.2.4)
赛璐珞(0.15.2)
分类器(1.3.4)
coffee-script(2.2.0)
coffee-script-source(1.7.0 )
colorator(0.1)
指挥官(4.1.6)
execjs(2.0.2)
fast-stemmer(1.0.2)
ffi(1.9.3 x86-mingw32)
highline(1.6.21)
i18n(0.6.9)
io-console(0.4.2)
jekyll(2.0.3)
哲基尔COF feescript(1.0.0)
jekyll-i18n(1.0.2)
jekyll-multiple-languages-plugin(1.2.5)
jekyll-sass-converter(1.0.0)
json(1.7.7)
kramdown(1.3.3)
liquid(2.5.5)
听(2.7.5,1.3.1)
maruku(0.6。 1)
雇佣兵(0.3.3)
minitest(5.3.4,4.3.2)
parslet(1.5.0)
posix-spawn(0.3.8)
psych(2.0.0)
pygments.rb(0.5.4)
rake(0.9.6)
rb -fsevent(0.9.4)
rb-inotify( 0.9.4)
rb-kqueue(0.2.2)
rdoc(4.0.0)
redcarpet(3.1.2,2.3.0)
safe_yaml(1.0.3, 0.9.7)
sass(3.3.7)
语法(1.2.0)
测试单元(2.0.0.0)
thread_safe(0.3.3)
定时器(1.1.0)
toml(0.1.1)
tzinfo(1.1.0)
yajl-ruby(1.1.0 x86-mingw32)

我试过运行不同版本的Jekyll,但没有运气。



任何帮助都非常感谢。

解决方案

看起来你可能从使用 Gemfile 这里。它看起来像这样:

  sourcehttps://rubygems.org
gemjekyll, 〜> 2.0
gemjekyll-multiple-languages-plugin

在你的Jekyll站点的根目录(你可以运行 jekyll build )。运行 bundle install ,然后运行Jekyll: bundle exec jekyll build 。有关 Gemfile Gemfile.lock 的更多信息,请查看。


I am trying to run Jekyll server on Windows using jekyll-multiple-languages-plugin but I keep getting this error message:

C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- jekyll-multiple-languages-plugin (LoadError)
        from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/lib/jekyll/plugin_manager.rb:28:in `block in require_gems'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/lib/jekyll/plugin_manager.rb:26:in `each'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/lib/jekyll/plugin_manager.rb:26:in `require_gems'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/lib/jekyll/plugin_manager.rb:19:in `conscientious_require'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/lib/jekyll/site.rb:71:in `setup'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/lib/jekyll/site.rb:33:in `initialize'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/lib/jekyll/commands/build.rb:26:in `new'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/lib/jekyll/commands/build.rb:26:in `process'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/lib/jekyll/commands/serve.rb:23:in `block (2 levels) in init_with_program'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/mercenary-0.3.3/lib/mercenary/command.rb:220:in `call'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/mercenary-0.3.3/lib/mercenary/command.rb:220:in `block in execute'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/mercenary-0.3.3/lib/mercenary/command.rb:220:in `each'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/mercenary-0.3.3/lib/mercenary/command.rb:220:in `execute'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/mercenary-0.3.3/lib/mercenary/program.rb:35:in `go'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/mercenary-0.3.3/lib/mercenary.rb:22:in `program'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/bin/jekyll:18:in `'
        from C:/Ruby200/bin/jekyll:23:in `load'
        from C:/Ruby200/bin/jekyll:23:in `'

I have added the following to the _config.yml:
gems:- jekyll-multiple-languages-plugin

Here is a list of my gem files:

*** LOCAL GEMS ***

activesupport (4.1.1)
bigdecimal (1.2.0)
blankslate (2.1.2.4)
celluloid (0.15.2)
classifier (1.3.4)
coffee-script (2.2.0)
coffee-script-source (1.7.0)
colorator (0.1)
commander (4.1.6)
execjs (2.0.2)
fast-stemmer (1.0.2)
ffi (1.9.3 x86-mingw32)
highline (1.6.21)
i18n (0.6.9)
io-console (0.4.2)
jekyll (2.0.3)
jekyll-coffeescript (1.0.0)
jekyll-i18n (1.0.2)
jekyll-multiple-languages-plugin (1.2.5)
jekyll-sass-converter (1.0.0)
json (1.7.7)
kramdown (1.3.3)
liquid (2.5.5)
listen (2.7.5, 1.3.1)
maruku (0.6.1)
mercenary (0.3.3)
minitest (5.3.4, 4.3.2)
parslet (1.5.0)
posix-spawn (0.3.8)
psych (2.0.0)
pygments.rb (0.5.4)
rake (0.9.6)
rb-fsevent (0.9.4)
rb-inotify (0.9.4)
rb-kqueue (0.2.2)
rdoc (4.0.0)
redcarpet (3.1.2, 2.3.0)
safe_yaml (1.0.3, 0.9.7)
sass (3.3.7)
syntax (1.2.0)
test-unit (2.0.0.0)
thread_safe (0.3.3)
timers (1.1.0)
toml (0.1.1)
tzinfo (1.1.0)
yajl-ruby (1.1.0 x86-mingw32)

I have tried running different versions of Jekyll but with no luck.

Any help is much appreciated.

解决方案

It looks like you might benefit from the use of a Bundler Gemfile here. It would look like this:

source "https://rubygems.org"
gem "jekyll", "~> 2.0"
gem "jekyll-multiple-languages-plugin"

Place this in the root of your Jekyll site (where you'd run jekyll build). Run bundle install, then run Jekyll: bundle exec jekyll build. For more information on Gemfile and Gemfile.lock, check out the Bundler documentation on the matter.

这篇关于使用jekyll-multiple-languages-plugin运行Jekyll时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 12:10