Windows 8 Jekyll服务不工作。未初始化常量。视窗8
我已经在Windows 8上安装了Jekyll,并创建了一个新的应用程序。我在目录中,当我运行Windows 8 Jekyll服务不工作。未初始化常量。视窗8,windows-8,cmd,jekyll,Windows 8,Cmd,Jekyll,我已经在Windows 8上安装了Jekyll,并创建了一个新的应用程序。我在目录中,当我运行jekyllserve C:/Blog/> jekyll serve C:/Ruby200/lib/ruby/gems/2.0.0/gems/safe_yaml-1.0.4/lib/safe_yaml/psych_resolver .rb:4:in `<class:PsychResolver>': uninitialized constant Psych::Nodes (NameErr
jekyllserve
C:/Blog/> jekyll serve
C:/Ruby200/lib/ruby/gems/2.0.0/gems/safe_yaml-1.0.4/lib/safe_yaml/psych_resolver
.rb:4:in `<class:PsychResolver>': uninitialized constant Psych::Nodes (NameError
)
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/safe_yaml-1.0.4/lib/safe_yaml/p
sych_resolver.rb:2:in `<module:SafeYAML>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/safe_yaml-1.0.4/lib/safe_yaml/p
sych_resolver.rb:1:in `<top (required)>'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:69:in `require'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:69:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/safe_yaml-1.0.4/lib/safe_yaml/l
oad.rb:131:in `<module:SafeYAML>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/safe_yaml-1.0.4/lib/safe_yaml/l
oad.rb:26:in `<top (required)>'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:69:in `require'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:69:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll.rb:26:i
n `<top (required)>'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:69:in `require'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:69:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.5.3/bin/jekyll:6:in `<
top (required)>'
from C:/Ruby200/bin/jekyll:23:in `load'
from C:/Ruby200/bin/jekyll:23:in `<main>'
如果有人能帮忙,谢谢 运行
gem cleanup
它应该可以解决问题这发生在我身上,我通过执行以下操作修复了它:
首先列出您的宝石gem list
...
pg_search (0.7.9)
polyglot (0.3.5)
posix-spawn (0.3.10)
power_assert (0.2.2)
psych (2.0.5, 2.0.0)
pygments.rb (0.6.2)
rack (1.6.0)
rack-cache (1.2)
rack-protection (1.5.3)
...
在看到psych的地方,尝试使用psych 2.0.5gem卸载psych-v2.0.0
如果收到错误消息,请卸载gem 2.0.5,而不是gem uninstall psych-v2.0.5
试试杰基尔。这对我有用。您需要找到与Ruby设置正确交互的psych版本。在我的例子中是2.0.0,但对你来说可能会有所不同 尝试
bundle exec jekyll service
在某些情况下,这将解决您的问题 谢谢。这解决了我的问题。最后做了这个-gem list
>psych(2.0.8,2.0.15),然后-gem uninstall psych-v2.0.15
问题解决了。这是一个更好的答案,我也遇到了同样的问题,但卸载了早期版本的pysch并完成了工作。谢谢阿米特,我编辑了卸载命令。他们人手不足。
...
pg_search (0.7.9)
polyglot (0.3.5)
posix-spawn (0.3.10)
power_assert (0.2.2)
psych (2.0.5, 2.0.0)
pygments.rb (0.6.2)
rack (1.6.0)
rack-cache (1.2)
rack-protection (1.5.3)
...