jekyll: jekyll 3.8.3 | Error: uninitialized constant FFI::Platform::CPU

My Environment

Software Version(s)
Operating System Ubuntu 19.10
jekyll Latest
github-pages No

Current Behavior

I was trying to run

sudo apt install jekyll
jekyll new my-awesome-site
cd my-awesome-site
bundle exec jekyll serve 

But it didn’t works and gave me the following error code: xec jekyll serve /var/lib/gems/2.5.0/gems/jekyll-3.8.5/lib/jekyll/drops/document_drop.rb:8: warning: already initialized constant Jekyll::Drops::DocumentDrop::NESTED_OBJECT_FIELD_BLACKLIST /usr/lib/ruby/vendor_ruby/jekyll/drops/document_drop.rb:8: warning: previous definition of NESTED_OBJECT_FIELD_BLACKLIST was here /var/lib/gems/2.5.0/gems/jekyll-3.8.5/lib/jekyll/drops/drop.rb:8: warning: already initialized constant Jekyll::Drops::Drop::NON_CONTENT_METHODS /usr/lib/ruby/vendor_ruby/jekyll/drops/drop.rb:8: warning: previous definition of NON_CONTENT_METHODS was here Configuration file: /home/chopin/Git/test/jekll/my-awesome-site/website/my_blog/_config.yml Source: /home/chopin/Git/test/jekll/my-awesome-site/website/my_blog Destination: /home/chopin/Git/test/jekll/my-awesome-site/website/my_blog/_site Incremental build: disabled. Enable with --incremental Generating… done in 0.363 seconds. jekyll 3.8.3 | Error: uninitialized constant FFI::Platform::CPU

Installation setup

I am on Ubuntu 19.10 and I have installed Jekyll I have installed Jekyll through the following line: sudo apt install jekyll because the common line: gem install bundler jekyll didn’t work.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 3
  • Comments: 20 (9 by maintainers)

Most upvoted comments

Hmm… this is indeed frustrating. Looks like you’ll have to resort to setting up local bundles for every Jekyll project…

  1. Move into your Jekyll project directory and run bundle config --local path vendor
  2. Then reinstall the entire dependency tree for your project by running bundle install
  3. Start Jekyll server.

To summarize:

cd PATH/TO/YOUR/PROJECT
bundle config --local path vendor
bundle install
bundle exec jekyll s -t

Note: If your project’s config file has an entry for exclude:, ensure that you have listed vendor/bundle under the exclude key in your config file.

Thank you so much, it works! This is what commands I needed to type:

bundle config --local path vendor
bundle install
bundle update listen
bundle exec jekyll s -t

Then I can go to http://localhost:4000 and It works!!! Thank you so much!

Yay! Glad you got it all working. I think you can restore the backup for the vendor_ruby directory now. That shouldn’t bother you anymore.

Happy Jekyllin.

Okay, you can delete the directories for ffi and listen for now. Then go back to your jekyll project directory, and run;

bundle update
bundle exec jekyll s -t # shorthand for the command you ran earlier