Reputation: 81
I got the below error on trying to start Jekyll server
Error: uninitialized constant
FFI::Platform::CPU
I tried reinstalling Jekyll server and its dependencies, but no luck. Could someone help me to get around this issue? Thanks.
I am using ubuntu=18.04, jekyll=3.8.6
anil@anil:~/customer-churn$ jekyll serve
Configuration file:
~/customer-churn/_config.yml
Source: ~/customer-churn
Destination: ~/customer-churn/_site
Incremental build: disabled. Enable with --incremental
Generating... done in 0.597 seconds.
jekyll 3.8.6 |
Error: uninitialized constant FFI::Platform::CPU
Upvotes: 7
Views: 2385
Reputation: 113
I guess this problem occurs if you've installed Jekyll through apt
. In that case a bundle update
won't work immediately after an apt remove
. Try the following approach:
Uninstall Jekyll first:
sudo apt remove jekyll*
Clean-up your dependency libs:
sudo apt autoremove
Then in your project directory run:
bundle update
Positively, then jekyll serve
should work for you.
Upvotes: 11
Reputation: 705
I ran into the same problem. After running bundle exec jekyll serve --trace
, I noticed that some packages were being loaded from the /usr/lib/ruby/vendor_ruby
directory. So, I removed the /usr/lib/ruby/vendor_ruby
directory (keeping a backup copy of it in my home directory, just in case). This, followed by bundle install
, fixed the issue for me.
Upvotes: 0
Reputation: 145
I was not able to solve this simply by running bundle update
or reinstalling jekyll and dependencies with apt as other answers suggested.
What did work was to
sudo gem uninstall ...
,apt-get remove ...
,apt-get install ...
,bundle update
in the project directory.Then only bundle exec jekyll serve
works, and jekyll build
still presents the same error.
Upvotes: 2
Reputation: 1
Try removing Jekyll using apt (if you've installed it that way):
sudo apt remove jekyll*
Then go to your project, type:
bundle update
and only then:
jekyll serve
Found this answer here: https://www.gitmemory.com/issue/jekyll/jekyll/7712/502572155
Upvotes: 0
Reputation: 81
I solved the problem by reinstalling the Jekyll and its dependencies using some steps which are given in the below link -
http://michaelchelen.net/81fa/install-jekyll-2-ubuntu-14-04/
I just want to thanks all who have to help and giving guidance to me from your busy schedule.
Upvotes: 1