Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

bundle install fails because of failed attempt to install gem ffi #44

Open
sbose78 opened this issue Aug 4, 2016 · 1 comment
Open

Comments

@sbose78
Copy link
Member

sbose78 commented Aug 4, 2016

The bundle install fails with the following error:

[shoubhik@dhcp35-156 almighty-devdoc]$ bundle install
Fetching git://github.com/asciidoctor/jekyll-asciidoc.git
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Installing rake 10.5.0
Installing addressable 2.4.0
Installing asciidoctor 1.5.4
Installing asciidoctor-diagram 1.5.1
Installing backports 3.6.8
Installing coderay 1.1.1

Installing colorator 0.1
Installing ffi 1.9.14 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /home/shoubhik/.gem/ruby/gems/ffi-1.9.14/ext/ffi_c
/usr/bin/ruby -r ./siteconf20160804-660-1tk4edq.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /home/shoubhik/.gem/ruby/gems/ffi-1.9.14 for inspection.
Results logged to /home/shoubhik/.gem/ruby/extensions/x86_64-linux/2.3.0/ffi-1.9.14/gem_make.out
An error occurred while installing ffi (1.9.14), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.9.14'` succeeds before bundling.

gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory

As a workaround:

yum -y install gcc ruby-devel gcc-c++

This partially solves the problem. Running the 'nundle install' now gives the following error in the log:
/home/shoubhik/.gem/ruby/extensions/x86_64-linux/2.3.0/ffi-1.9.14/mkmf.log

`gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory

To fix this, the following was done:dnf install redhat-rpm-config`

Now install the problematic gem manually :

``gem install ffi -v '1.9.14'`

Running the bundle install works successfully now.

@bartoszmajsak
Copy link
Contributor

One idea to improve the setup would be to provide a docker container. I did a similar one for arquillian.org. Should simplify working with the content quite a bit.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants