I'm currently trying to build a Ruby app on a Centos 6.6 machine. There are different Ruby stacks installed through Software Collections. Please not that I do not have root on the machine, and my privileges are limited, particularly, they do not include package installation.
Native extensions do not build. It seems ruby-devel
is missing, but I was told by the admin that it was correctly installed for both stacks:
dnf install rh-ruby22-ruby-devel.x86_64 ruby193-ruby-devel.x86_64 -y
Here is my problem:
bob@server ~> scl enable rh-ruby22 bash
bash-4.1$ ruby -v
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux-gnu]
bash-4.1$ gem install json Building native extensions. This could take a while... ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/opt/rh/rh-ruby22/root/usr/bin/ruby -r ./siteconf20150625-17536-saskmd.rb extconf.rb mkmf.rb can't find header files for ruby at /opt/rh/rh-ruby22/root/usr/share/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in ~/.gem/ruby/gems/json-1.8.3 for inspection. Results logged to ~/.gem/ruby/extensions/x86_64-linux/json-1.8.3/gem_make.out
How can I check if ruby-devel
(more precisely, rh-ruby22-ruby-devel.x86_64
) is properly installed?
What would be the next place to search if it's working as intended?
This is most likely because you don't have the devel libraries installed for the SCLo ruby version.
sudo yum install rh-ruby22-ruby-devel