pattex / jekyll-tagging

Jekyll plugin to automatically generate a tag cloud and tag pages.
385 stars 76 forks source link

Cannot load such file -- jekyll-tagging #57

Closed fancywriter closed 7 years ago

fancywriter commented 7 years ago

It simply doesn't work for me. After I added - jekyll-tagging to the _config.yml, I am receiving error message like

Dependency Error: Yikes! It looks like you don't have jekyll-tagging or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- jekyll-tagging' If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/!                              
jekyll 3.2.1 | Error:  jekyll-tagging

But it is installed - I installed it with gem install jekyll-tagging without any error:

jekyll-tagging-1.0.1 [2015-06-11]:

* Substitution of non ASCII characters and whitespaces, also when 'tag_permalink_style: pretty'.

Successfully installed jekyll-tagging-1.0.1
Parsing documentation for jekyll-tagging-1.0.1
Done installing documentation for jekyll-tagging after 0 seconds
1 gem installed

What am I doing wrong?

If I open irb and type require 'jekyll-tagging', I am getting similar error:

LoadError: cannot load such file -- jekyll-tagging
        from /usr/lib64/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/lib64/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from (irb):1
        from /usr/bin/irb:11:in `<main>'

What is wrong here?

$ gem list | grep jekyll
jekyll (3.3.1, 3.2.1)
jekyll-feed (0.8.0)
jekyll-paginate (1.1.0)
jekyll-sass-converter (1.4.0)
jekyll-sitemap (0.11.0)
jekyll-tagging (1.0.1)
jekyll-watch (1.3.1)
$ gem --version
2.6.8
$ ruby --version
ruby 2.2.6p396 (2016-11-15 revision 56800) [x86_64-linux]
dominicsayers commented 7 years ago

👍 (me too)

fancywriter commented 7 years ago

-t options gives a bit more information

  Dependency Error: Yikes! It looks like you don't have jekyll-tagging or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- jekyll-tagging' If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/! 
/usr/lib64/ruby/gems/2.2.0/gems/jekyll-3.2.1/lib/jekyll/external.rb:53:in `rescue in block in require_with_graceful_fail': jekyll-tagging (Jekyll::Errors::MissingDependencyException)
        from /usr/lib64/ruby/gems/2.2.0/gems/jekyll-3.2.1/lib/jekyll/external.rb:41:in `block in require_with_graceful_fail'
        from /usr/lib64/ruby/gems/2.2.0/gems/jekyll-3.2.1/lib/jekyll/external.rb:40:in `each'
        from /usr/lib64/ruby/gems/2.2.0/gems/jekyll-3.2.1/lib/jekyll/external.rb:40:in `require_with_graceful_fail'
        from /usr/lib64/ruby/gems/2.2.0/gems/jekyll-3.2.1/lib/jekyll/plugin_manager.rb:27:in `require_gems'
        from /usr/lib64/ruby/gems/2.2.0/gems/jekyll-3.2.1/lib/jekyll/plugin_manager.rb:19:in `conscientious_require'
        from /usr/lib64/ruby/gems/2.2.0/gems/jekyll-3.2.1/lib/jekyll/site.rb:111:in `setup'
        from /usr/lib64/ruby/gems/2.2.0/gems/jekyll-3.2.1/lib/jekyll/site.rb:33:in `initialize'
        from /usr/lib64/ruby/gems/2.2.0/gems/jekyll-3.2.1/lib/jekyll/commands/build.rb:28:in `new'
        from /usr/lib64/ruby/gems/2.2.0/gems/jekyll-3.2.1/lib/jekyll/commands/build.rb:28:in `process'
        from /usr/lib64/ruby/gems/2.2.0/gems/jekyll-3.2.1/lib/jekyll/commands/build.rb:16:in `block (2 levels) in init_with_program'
        from /usr/lib64/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `call'
        from /usr/lib64/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
        from /usr/lib64/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
        from /usr/lib64/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
        from /usr/lib64/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
        from /usr/lib64/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
        from /usr/lib64/ruby/gems/2.2.0/gems/jekyll-3.2.1/exe/jekyll:13:in `<top (required)>'
        from /usr/bin/jekyll:9:in `load'
        from /usr/bin/jekyll:9:in `<main>'

What is left to find out is which exact dependency is missing...

fancywriter commented 7 years ago

Oh, it seems I found out, what's wrong. README says to add line

require 'jekyll/tagging'

to the file _plugins/ext.rb

What I did - I added the following line to gem section inside my _config.yml file

  - jekyll-tagging

I did it wrong, I had to use jekyll/tagging instead of jekyll-tagging

  - jekyll/tagging

https://jekyllrb.com/docs/plugins/ for the reference. There are overall 3 different options to add plugins to the project.