SOLVED --Fatal Error building sites on one particular computer


#1

I only get this error on one particular computer when I try to compile a site – any site. When I use the exact same files on a different computer, jekyll works fine. Can someone help me understand what I have done wrong with this computer setup?
Liquid Exception: undefined method includes_load_paths' for #<Jekyll::Site:0x00555e8dec00b8> in _layouts/default.html jekyll 3.1.6 | Error: undefined methodincludes_load_paths’ for #Jekyll::Site:0x00555e8dec00b8

Thanks!


#2

A good place to start is to ensure you’re running the same versions of everything:

jekyll -v
ruby -v
gem -v

If versions check out, run jekyll build --trace and report back.


#3

Thanks for helping me.
These are the outputs. I think they’re all up to date.

$ jekyll -v
/var/lib/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/drops/document_drop.rb:8: warning: already initialized constant Jekyll::Drops::DocumentDrop::NESTED_OBJECT_FIELD_BLACKLIST
/usr/lib/ruby/vendor_ruby/jekyll/drops/document_drop.rb:8: warning: previous definition of NESTED_OBJECT_FIELD_BLACKLIST was here
/var/lib/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/drops/drop.rb:8: warning: already initialized constant Jekyll::Drops::Drop::NON_CONTENT_METHODS
/usr/lib/ruby/vendor_ruby/jekyll/drops/drop.rb:8: warning: previous definition of NON_CONTENT_METHODS was here
jekyll 3.1.6

Kitchen:~$ ruby -v
ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]

Kitchen:~$ gem -v
2.6.11

var/lib/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/drops/document_drop.rb:8: warning: already initialized constant Jekyll::Drops::DocumentDrop::NESTED_OBJECT_FIELD_BLACKLIST
/usr/lib/ruby/vendor_ruby/jekyll/drops/document_drop.rb:8: warning: previous definition of NESTED_OBJECT_FIELD_BLACKLIST was here
/var/lib/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/drops/drop.rb:8: warning: already initialized constant Jekyll::Drops::Drop::NON_CONTENT_METHODS
/usr/lib/ruby/vendor_ruby/jekyll/drops/drop.rb:8: warning: previous definition of NON_CONTENT_METHODS was here
Configuration file: /home/bz/ownCloud/chicago-collective-master/_config.yml
Configuration file: /home/bz/ownCloud/chicago-collective-master/_config.yml
Source: /home/bz/ownCloud/chicago-collective-master
Destination: /home/bz/ownCloud/chicago-collective-master/_site
Incremental build: disabled. Enable with --incremental
Generating…
Liquid Exception: undefined method includes_load_paths' for #<Jekyll::Site:0x0055dd3367a0c8> in _layouts/default.html /var/lib/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/tags/include.rb:109:intag_includes_dirs’: undefined method includes_load_paths' for #<Jekyll::Site:0x0055dd3367a0c8> (NoMethodError) from /var/lib/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/tags/include.rb:113:inlocate_include_file’
from /var/lib/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/tags/include.rb:129:in render' from /usr/lib/ruby/vendor_ruby/liquid/block.rb:151:inrender_token’
from /usr/lib/ruby/vendor_ruby/liquid/profiler/hooks.rb:5:in block in render_token_with_profiling' from /usr/lib/ruby/vendor_ruby/liquid/profiler.rb:80:inprofile_token_render’
from /usr/lib/ruby/vendor_ruby/liquid/profiler/hooks.rb:4:in render_token_with_profiling' from /usr/lib/ruby/vendor_ruby/liquid/block.rb:135:inblock in render_all’
from /usr/lib/ruby/vendor_ruby/liquid/block.rb:122:in each' from /usr/lib/ruby/vendor_ruby/liquid/block.rb:122:inrender_all’
from /usr/lib/ruby/vendor_ruby/liquid/block.rb:108:in render' from /usr/lib/ruby/vendor_ruby/liquid/template.rb:210:inblock in render’
from /usr/lib/ruby/vendor_ruby/liquid/template.rb:262:in with_profiling' from /usr/lib/ruby/vendor_ruby/liquid/template.rb:209:inrender’
from /usr/lib/ruby/vendor_ruby/liquid/template.rb:222:in render!' from /usr/lib/ruby/vendor_ruby/jekyll/liquid_renderer/file.rb:28:inblock (2 levels) in render!'
from /usr/lib/ruby/vendor_ruby/jekyll/liquid_renderer/file.rb:36:in measure_bytes' from /usr/lib/ruby/vendor_ruby/jekyll/liquid_renderer/file.rb:27:inblock in render!'
from /usr/lib/ruby/vendor_ruby/jekyll/liquid_renderer/file.rb:43:in measure_time' from /usr/lib/ruby/vendor_ruby/jekyll/liquid_renderer/file.rb:26:inrender!‘
from /usr/lib/ruby/vendor_ruby/jekyll/renderer.rb:106:in render_liquid' from /usr/lib/ruby/vendor_ruby/jekyll/renderer.rb:146:inplace_in_layouts’
from /usr/lib/ruby/vendor_ruby/jekyll/renderer.rb:70:in run' from /usr/lib/ruby/vendor_ruby/jekyll/site.rb:179:inblock in render’
from /usr/lib/ruby/vendor_ruby/jekyll/site.rb:177:in each' from /usr/lib/ruby/vendor_ruby/jekyll/site.rb:177:inrender’
from /usr/lib/ruby/vendor_ruby/jekyll/site.rb:59:in process' from /usr/lib/ruby/vendor_ruby/jekyll/command.rb:26:inprocess_site’
from /var/lib/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/commands/build.rb:63:in build' from /var/lib/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/commands/build.rb:34:inprocess’
from /var/lib/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/commands/serve.rb:37:in block (2 levels) in init_with_program' from /usr/lib/ruby/vendor_ruby/mercenary/command.rb:220:inblock in execute’
from /usr/lib/ruby/vendor_ruby/mercenary/command.rb:220:in each' from /usr/lib/ruby/vendor_ruby/mercenary/command.rb:220:inexecute’
from /usr/lib/ruby/vendor_ruby/mercenary/program.rb:42:in go' from /usr/lib/ruby/vendor_ruby/mercenary.rb:19:inprogram’
from /var/lib/gems/2.3.0/gems/jekyll-3.4.3/exe/jekyll:13:in <top (required)>' from /usr/local/bin/jekyll:22:inload’
from /usr/local/bin/jekyll:22:in `’


#4

Because Jekyll is a Ruby app you might want to look into using Bundler. What’s likely going on for is you have different gem versions installed across your machines and that’s causing the errors.

With Bundler it uses a Gemfile to manage all the gem dependencies which helps you keep all the versions in sync between development environments. The only change really is prepending Jekyll commands with bundle exec.

For a better write up on this check this post https://learn.cloudcannon.com/jekyll/gemfiles-and-the-bundler/

You’ll find a lot of these sorts of errors just go away. It really is the preferred way to use Jekyll.


#5

Thanks so much for weighing in here. I really appreciate it. I watched the video, created a simple Gemfile and did the bundler install, but when I use bundle exec jekyll serve, it now says
bundler: failed to load command: jekyll (/usr/local/bin/jekyll)
LoadError: cannot load such file – /usr/share/rubygems-integration/all/gems/jekyll-3.1.6/bin/jekyll
/usr/local/bin/jekyll:22:in load' /usr/local/bin/jekyll:22:in<top (required)>’

So there must be one last thing I am failing to do… Any thoughts?


#6

Try bundle update jekyll. Looks like you have an older version of Jekyll so updating might help.


#7

i updated jekyll, but it still can’t find it.


#8

I discovered that I had installed jekyll with apt-get in addition to gem, and that is where the two were causing conflict. Once I uninstalled with apt-get and left the gem version, all conflicts went away.

Thanks for your assistance.