`jekyll serve`导致控制台中的加载错误。无法在本地启动jekyll服务器

时间:2019-02-28 02:20:38

标签: jekyll github-pages

我正在尝试运行本地Jekyll服务器来检查我的身份,但是在运行:jekyll serve命令之后,我得到了:

/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/yaml.rb:5:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require': incompatible library version - /usr/local/rvm/gems/ruby-2.3.1/gems/psych-2.2.2/lib/psych.bundle (LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require'
    from /usr/local/rvm/gems/ruby-2.3.1/gems/psych-2.2.2/lib/psych.rb:8:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/yaml.rb:6:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require'
    from /usr/local/rvm/gems/ruby-2.3.1/gems/safe_yaml-1.0.4/lib/safe_yaml/load.rb:2:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /usr/local/rvm/gems/ruby-2.3.1/gems/jekyll-3.5.2/lib/jekyll.rb:29:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /usr/local/rvm/gems/ruby-2.3.1/gems/jekyll-3.5.2/exe/jekyll:6:in `<top (required)>'
    from /usr/local/bin/jekyll:26:in `load'
    from /usr/local/bin/jekyll:26:in `<main>'

1 个答案:

答案 0 :(得分:0)

首先检查是否可以安装libyaml

然后gem install psych

还要检查rbenv/ruby-build issue 1251GEM_HOME设置。