Trying to learn how to write plugins in Jekyll. I created a simple gem after import i got this message
puts from custom plugin
Configuration file: /mnt/c/Users/_sectasy/Desktop/landing/_config.yml
Dependency Error: Yikes! It looks like you don't have jekyll-test or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. If you've run Jekyll with `bundle exec`, ensure that you have included the jekyll-test gem in your Gemfile as well. The full error message from Ruby is: 'cannot load such file -- jekyll-test' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
/home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/external.rb:70:in `rescue in block in require_with_graceful_fail': jekyll-test (Jekyll::Errors::MissingDependencyException)
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/external.rb:56:in `block in require_with_graceful_fail'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/external.rb:55:in `each'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/external.rb:55:in `require_with_graceful_fail'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/plugin_manager.rb:30:in `require_gems'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/plugin_manager.rb:22:in `conscientious_require'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/site.rb:131:in `setup'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/site.rb:36:in `initialize'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/commands/build.rb:30:in `new'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/commands/build.rb:30:in `process'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/command.rb:91:in `each'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/exe/jekyll:15:in `<top (required)>'
from /home/sectasy/.rvm/gems/ruby-3.0.0/bin/jekyll:23:in `load'
from /home/sectasy/.rvm/gems/ruby-3.0.0/bin/jekyll:23:in `<main>'
from /home/sectasy/.rvm/gems/ruby-3.0.0/bin/ruby_executable_hooks:22:in `eval'
from /home/sectasy/.rvm/gems/ruby-3.0.0/bin/ruby_executable_hooks:22:in `<main>'
/home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/external.rb:57:in `require': cannot load such file -- jekyll-test(LoadError)
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/external.rb:57:in `block in require_with_graceful_fail'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/external.rb:55:in `each'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/external.rb:55:in `require_with_graceful_fail'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/plugin_manager.rb:30:in `require_gems'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/plugin_manager.rb:22:in `conscientious_require'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/site.rb:131:in `setup'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/site.rb:36:in `initialize'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/commands/build.rb:30:in `new'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/commands/build.rb:30:in `process'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/command.rb:91:in `each'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
from /home/sectasy/.rvm/gems/ruby-3.0.0/gems/jekyll-4.3.1/exe/jekyll:15:in `<top (required)>'
from /home/sectasy/.rvm/gems/ruby-3.0.0/bin/jekyll:23:in `load'
from /home/sectasy/.rvm/gems/ruby-3.0.0/bin/jekyll:23:in `<main>'
from /home/sectasy/.rvm/gems/ruby-3.0.0/bin/ruby_executable_hooks:22:in `eval'
from /home/sectasy/.rvm/gems/ruby-3.0.0/bin/ruby_executable_hooks:22:in `<main>'
The gem was successfully installed with bundle install, I run the server with bundle exec jekyll serve
, I have this gem in the same directory as my project.
Gemfile:
source 'https://rubygems.org'
gem "bundler"
gem "jekyll", "~> 4.3.1"
gem "webrick", "~> 1.7"
group :jekyll_plugins do
gem 'jekyll-test'
gem "jekyll-paginate"
gem "jekyll-sitemap"
gem 'jekyll-multiple-languages-plugin'
end