Error: uninitialized constant FFI::Platform::CPU on starting jekyll server
Asked Answered
V

5

7

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
Vaporizer answered 19/7, 2019 at 4:21 Comment(5)
FWIW, Jekyll has no server.Phytobiology
Try bundle exec jekyll serve.Phytobiology
I also tried bundle exec Jekyll server but issue not solved showing the same error again gVaporizer
Have you run bundle install there before?Phytobiology
yes, I installed bundle before starting the serverVaporizer
A
11

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.

Audiovisual answered 11/1, 2020 at 22:16 Comment(1)
Don't forget the apt autoremove! without, it will not work!Carreno
M
2

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

  • remove all versions of jekyll and dependencies with sudo gem uninstall ...,
  • remove jekyll and all dependencies with apt-get remove ...,
  • then reinstall jekyll and dependencies with apt-get install ...,
  • and then run bundle update in the project directory.

Then only bundle exec jekyll serve works, and jekyll build still presents the same error.

Mitrailleuse answered 18/10, 2019 at 1:47 Comment(0)
V
1

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.

Vaporizer answered 19/7, 2019 at 8:50 Comment(0)
A
0

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

Arms answered 16/8, 2019 at 15:32 Comment(1)
Don't forget to sudo apt autoremove after the first step!Hiedihiemal
D
0

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.

Derek answered 4/11, 2019 at 0:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.