3

I am trying to install compass on RedHat 7.

I have ruby version ruby 2.0.0p598 (2014-11-13) [x86_64-linux] installed.

I am executing the following commands:

sudo yum insatll ruby
sudo yum install gcc gcc-c++ make automake autoconf curl-devel openssl-devel zlib-devel httpd-devel apr-devel apr-util-devel sqlite-devel
sudo gem install compass --http-proxy http://XXXXX:XXXX@XXXX:8080

I am getting the following error:

Building native extensions. This could take a while... ERROR: Error installing compass: ERROR: Failed to build gem native extension.

/usr/bin/ruby -r ./siteconf20150729-6603-73q6zu.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 /usr/local/share/gems/gems/ffi-1.9.10 for inspection. Results logged to /usr/local/lib64/gems/ruby/ffi-1.9.10/gem_make.out

Not sure how to fix this. Before installing compass I even tried

sudo gem update --system

Still the same error. Then I tried updating ruby to 2.2.2 but still the same error. The gem version is 2.0.14

anon
  • 367
  • 1
  • 4
  • 18

1 Answers1

4

I believe you also need a yum install ruby-devel to get the ruby.h onto your system. If that's not enough, the bigger-hammer approach would be to install the full 'Development Tools' packages with:

yum groupinstall 'Development Tools'
Micah Elliott
  • 9,600
  • 5
  • 51
  • 54
  • 2
    ruby-devel is not in RHEL7. That's what the issue is. – anon Jul 29 '15 at 23:28
  • So it requires 'Development Tools' in addition to all the other packages as well. It fixed it up :) – anon Jul 29 '15 at 23:40
  • I do see ruby-devel in CentOS 7, so that's surprising RHEL7 does not have it. Anyway, glad you solved it. Good idea to have 'Development Tools' on there to be on the safe side. – Micah Elliott Jul 30 '15 at 00:01
  • @Tushar-Gupta Did this answer solve your issue? If so, please mark it as accepted so that others can see that it worked for this case. – Micah Elliott Aug 14 '15 at 16:18