slashdotdash / jekyll-lunr-js-search

[UNSUPPORTED] Jekyll + lunr.js = static websites with powerful full-text search using JavaScript
MIT License
549 stars 105 forks source link

LoadError when trying to build: jekyll_lunr_js_search.rb:5:in `require': cannot load such file #53

Open patrickwelker opened 9 years ago

patrickwelker commented 9 years ago

I've just set up a new non-Github Jekyll (v2.5.3) blog and get this error while build when adding the gem to my _plugins directory.

I didn't proceed to any of the steps in the installation documents since I wanted to check first if the plugins throws up any errors… well, it did:

Warning: Command failed: /Users/pat/Sites/ubc.com/_src/_plugins/jekyll_lunr_js_search.rb:5:in `require': cannot load such file -- v8 (LoadError)
    from /Users/pat/Sites/ubc.com/_src/_plugins/jekyll_lunr_js_search.rb:5:in `<top (required)>'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:74:in `require'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:74:in `block (2 levels) in require_plugin_files'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:73:in `each'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:73:in `block in require_plugin_files'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:72:in `each'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:72:in `require_plugin_files'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:18:in `conscientious_require'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/gems/jekyll-2.5.3/lib/jekyll/site.rb:79:in `setup'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/gems/jekyll-2.5.3/lib/jekyll/site.rb:41:in `initialize'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:29:in `new'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:29:in `process'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/gems/jekyll-2.5.3/bin/jekyll:20:in `<top (required)>'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/bin/jekyll:23:in `load'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/bin/jekyll:23:in `<main>'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/bin/ruby_executable_hooks:15:in `eval'
    from /Users/pat/.rvm/gems/ruby-2.1.0@derubercast/bin/ruby_executable_hooks:15:in `<main>'

I also tried to install the gem instead of the plugin and also checked if the previous works via gem install jekyll-lunr-js-search -v 0.1.1 but both threw up the same error.

hdgarrood commented 9 years ago

You need to install the gem therubyracer for require 'v8' to work.

slashdotdash commented 9 years ago

@pattulus Did you resolve this by installing therubyracer?

If you try using this plugin via the gem route you might find it easier as it should install the dependencies automatically.

patrickwelker commented 9 years ago

I've tried it again today. It's strange, I get the same error despite all 4 gems being in place. I've found another search which works, but still… if you have any ideas on what I could check for I'm ready to try them out.