Jekyll无法提供服务(Ruby不兼容的库版本)

当试图运行jekyll服务时,它似乎正确构建(虽然警告我无法解决),但随后无法提供服务. jekyll构建完成,但生成文件缺少已编译的CSS.

jekyll服务的输出

Ignoring ffi-1.9.10 because its extensions are not built.  Try: gem pristine ffi --version 1.9.10
Ignoring curb-0.9.3 because its extensions are not built.  Try: gem pristine curb --version 0.9.3
Ignoring executable-hooks-1.3.2 because its extensions are not built.  Try: gem pristine executable-hooks --version 1.3.2
Ignoring ffi-1.9.10 because its extensions are not built.  Try: gem pristine ffi --version 1.9.10
Ignoring gem-wrappers-1.2.7 because its extensions are not built.  Try: gem pristine gem-wrappers --version 1.2.7
Ignoring json-1.8.2 because its extensions are not built.  Try: gem pristine json --version 1.8.2
Ignoring thin-1.6.1 because its extensions are not built.  Try: gem pristine thin --version 1.6.1
Configuration file: /home/jtebert/OwnCloud/Projects/Programming/python/AMS/mockup/_config.yml
            Source: /home/jtebert/OwnCloud/Projects/Programming/python/AMS/mockup
       Destination: /home/jtebert/OwnCloud/Projects/Programming/python/AMS/mockup/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
                    done in 1.404 seconds.
/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require': incompatible library version - /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/ffi-1.9.10/lib/ffi_c.so (LoadError)
        from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/ffi-1.9.10/lib/ffi.rb:6:in `rescue in <top (required)>'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/ffi-1.9.10/lib/ffi.rb:3:in `<top (required)>'
        from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require'
        from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/rb-inotify-0.9.7/lib/rb-inotify/native.rb:1:in `<top (required)>'
        from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
        from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/rb-inotify-0.9.7/lib/rb-inotify.rb:1:in `<top (required)>'
        from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
        from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/adapter/linux.rb:30:in `_configure'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/adapter/base.rb:45:in `block in configure'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/adapter/base.rb:40:in `each'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/adapter/base.rb:40:in `configure'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/adapter/base.rb:63:in `start'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/backend.rb:26:in `start'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/listener.rb:67:in `block in <class:Listener>'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/fsm.rb:120:in `instance_eval'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/fsm.rb:120:in `call'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/fsm.rb:91:in `transition_with_callbacks!'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/fsm.rb:57:in `transition'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/listener.rb:90:in `start'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/jekyll-watch-1.3.1/lib/jekyll/watcher.rb:12:in `watch'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/jekyll-3.1.3/lib/jekyll/commands/build.rb:72:in `watch'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/jekyll-3.1.3/lib/jekyll/commands/build.rb:39:in `process'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/jekyll-3.1.3/lib/jekyll/commands/serve.rb:34:in `block (2 levels) in init_with_program'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
        from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/jekyll-3.1.3/bin/jekyll:13:in `<top (required)>'
        from /usr/local/bin/jekyll:23:in `load'
        from /usr/local/bin/jekyll:23:in `<main>'

在尝试启动Jekyll项目时,我确实必须创建一个Ruby版本的链接,因为它正在寻找’Ruby2.1′,但我不确定它是否在当前问题中起作用:ln -s /usr/bin/ruby​​’/usr/bin/ruby2.1′.

根据我的包管理器,我已经安装了Ruby 2.3.0.但根据哪个ruby,我使用的是2.0.0,它来自rvm:/home/xxxxxxx/.rvm/rubies/ruby-2.0.0-p643/bin/ruby.正如我之前提到的,Jekyll似乎想要v2.1.我猜这些冲突的版本在某种程度上导致了问题,但我不知道如何解决它.

解决方法

我的问题似乎是rvm(我不知道我最终如何使用).解决方案是使用rvm implode删除rvm,然后使用gem install jekyll重新安装jekyll.警告和错误都消失了,并且正常运行.

相关文章

validates:conclusion,:presence=>true,:inclusion=>{...
一、redis集群搭建redis3.0以前,提供了Sentinel工具来监控各...
分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣...
上一篇博文 ruby传参之引用类型 里边定义了一个方法名 mo...
一编程与编程语言 什么是编程语言? 能够被计算机所识别的表...
Ruby类和对象Ruby是一种完美的面向对象编程语言。面向对象编...