Search code examples
rubylinuxredhatcompass

Unable to install Compass on RedHat 7


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


Solution

  • 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'