Jekyll build error

I am trying to create a jekyll site using the command jekyll build. When I run the command, I get the following error:

    /usr/local/share/ruby/gems/2.0/gems/bundler-1.13.1/lib/bundler/rubygems_ext.rb:45:in `full_gem_path': uninitialized constant Bundler::Plugin::API::Source (NameError)
    from /usr/share/ruby/vendor_ruby/2.0/rubygems/specification.rb:1393:in `contains_requirable_file?'
    from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:68:in `block in require'
    from /usr/share/ruby/vendor_ruby/2.0/rubygems/specification.rb:823:in `block in each'
    from /usr/share/ruby/vendor_ruby/2.0/rubygems/specification.rb:822:in `each'
    from /usr/share/ruby/vendor_ruby/2.0/rubygems/specification.rb:822:in `each'
    from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:67:in `find'
    from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:67:in `require'
    from /usr/local/share/ruby/gems/2.0/gems/bundler-1.13.1/lib/bundler/plugin/api/source.rb:2:in `<top (required)>'
    from /usr/local/share/ruby/gems/2.0/gems/bundler-1.13.1/lib/bundler/rubygems_ext.rb:45:in `full_gem_path'
    from /usr/share/ruby/vendor_ruby/2.0/rubygems/specification.rb:1393:in `contains_requirable_file?'
    from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:68:in `block in require'
    from /usr/share/ruby/vendor_ruby/2.0/rubygems/specification.rb:823:in `block in each'
    from /usr/share/ruby/vendor_ruby/2.0/rubygems/specification.rb:822:in `each'
    from /usr/share/ruby/vendor_ruby/2.0/rubygems/specification.rb:822:in `each'
    from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:67:in `find'
    from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:67:in `require'
    from /usr/local/share/ruby/gems/2.0/gems/bundler-1.13.1/lib/bundler.rb:11:in `<top (required)>'
    from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:135:in `require'
    from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
    from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:144:in `require'
    from /usr/local/share/ruby/gems/2.0/gems/jekyll-3.2.1/lib/jekyll/plugin_manager.rb:34:in `require_from_bundler'
    from /usr/local/share/ruby/gems/2.0/gems/jekyll-3.2.1/exe/jekyll:9:in `<top (required)>'
    from /usr/local/bin/jekyll:23:in `load'
    from /usr/local/bin/jekyll:23:in `<main>'

I am running Ruby version 2.2. My Amazon Linux AMI Server. Let me know if there is any other information needed to answer the question!

+4
source share
2 answers

In the end, I realized that. Apparently I was missing a javascript environment. Steps:

  • sudo rm -r Gemfile.lock
  • nano Gemfile. Add gem 'therubyracer'. Save and exit
  • bundle install
  • bundle exec jekyll build

This fixed the problem for me!

+4
source

I ran into the same problem. This happens if you do not have bundler and jekyll initialized dependencies.

To fix this

  • Go to the root directory containing your jekyll files
  • jekyll new . --force. bundler jekyll.
  • , bundler exec jekyll serve

jekyll new . --force git init git. . .

+2

Source: https://habr.com/ru/post/1654832/


All Articles