简体   繁体   English

尝试在Rails应用中安装gem bootstrap-sass时出现Gem :: Ext :: BuildError

[英]Gem::Ext::BuildError while trying to install gem bootstrap-sass in rails app

Okay so I'm trying to install the gem bootstrap-sass in my ruby on rails app but getting this error. 好的,所以我试图在我的ruby on rails应用程序中安装gem bootstrap-sass ,但出现此错误。

I followed the basic steps by pasting $ gem 'bootstrap-sass' and $ gem 'autoprefixer-rails' into the gemfile and runnig bndle install in the terminal. 我遵循了基本步骤,将$ gem 'bootstrap-sass' $ gem 'autoprefixer-rails' $ gem 'bootstrap-sass'$ gem 'autoprefixer-rails'粘贴到gemfile中,并在终端中安装了runnig bndle。 My laptop is running on ubuntu 18.04 if that might be causing issue. 如果这可能导致问题,则我的笔记本电脑正在ubuntu 18.04上运行。

Installing autoprefixer-rails 9.6.1
Using debug_inspector 0.0.2
Using binding_of_caller 0.7.2
Fetching ffi 1.11.1
Installing ffi 1.11.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/tmp/bundler20190706-4690-hktydzffi-1.11.1/gems/ffi-1.11.1/ext/ffi_c
/usr/bin/ruby2.5 -r ./siteconf20190706-4690-tr7q8y.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in
/tmp/bundler20190706-4690-hktydzffi-1.11.1/gems/ffi-1.11.1 for inspection.
Results logged to
/tmp/bundler20190706-4690-hktydzffi-1.11.1/extensions/x86_64-linux/2.5.0/ffi-1.11.1/gem_make.out

An error occurred while installing ffi (1.11.1), and Bundler cannot
continue.
Make sure that `gem install ffi -v '1.11.1'` succeeds before bundling.

In Gemfile:
  bootstrap-sass was resolved to 3.4.1, which depends on
    sassc was resolved to 2.0.1, which depends on
      ffi

gem 'bootstrap-sass', '3.3.7' 宝石'bootstrap-sass','3.3.7'

repelce 排斥

gem 'bootstrap-sass'. gem'bootstrap-sass'。

because bootstrap-sass was 3.4.1 too higher. 因为bootstrap-sass太高了3.4.1。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM