0
votes

I am installing less plugin for jekyll but placing this file to _plugins folder: https://gist.github.com/joshbrown/760265

I have run: sudo gem install less

I have verified the gem is installed using gem list : less (2.6.0)

Ran gem env gemdir : /usr/local/lib/ruby/gems/2.4.0

gem which 'less' : /usr/local/lib/ruby/gems/2.4.0/gems/less-2.6.0/lib/less.rb

although I am not able to find it using bundle show --paths

When I run it, it complains the gem has not been installed:

You are missing the library required for less. Please run:
 $ [sudo] gem install less
  Conversion error: Jekyll::LessConverter encountered an error while converting 'aa.less':
                    uninitialized constant Jekyll::LessConverter::FatalException Did you mean? SignalException
jekyll 3.5.1 | Error:  uninitialized constant Jekyll::LessConverter::FatalException

Mac version: El Capitan

Can someone tell me where I did wrong ?

1
I don't have this problem running on my mac using ruby 2.3.0, but when I try to build my jekyll site with the Docker jekyll image, using ruby 2.4.2, I get this problem, even if I'm doing bundle exec jekyll serve. Any idea why? - Ben Lindsay

1 Answers

0
votes

As you are using bundle you need to add it to the Gemfile as a gem dependency.

Then run bundle install and you will be able to see it with bundle show and run Jekyll with bundle exec jekyll serve.