首页 > 解决方案 > 错误:启动 jekyll 服务器时未初始化的常量 FFI::Platform::CPU

问题描述

尝试启动 Jekyll 服务器时出现以下错误

错误:未初始化的常量FFI::Platform::CPU

我尝试重新安装 Jekyll 服务器及其依赖项,但没有运气。有人可以帮我解决这个问题吗?谢谢。

我正在使用ubuntu=18.04jekyll=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

标签: rubyrubygemsjekylljekyll-theme

解决方案


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.


推荐阅读