Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't find header files for Ruby on SUSE?

I'm attempting to install compass on SUSE Enterprise 11 SP3. I get the following. Any ideas?

gem install compass

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

/usr/bin/ruby extconf.rb
<b>mkmf.rb can't find header files for ruby at /usr/lib64/ruby/ruby.h</b>

extconf failed, exit code 1

Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/ffi-1.9.3 for inspection.
Results logged to /usr/lib64/ruby/gems/1.8/extensions/x86_64-linux/1.8/ffi-1.9.3gem_make.out
like image 459
Brian McAuliffe Avatar asked Jan 09 '14 17:01

Brian McAuliffe


2 Answers

zypper in ruby-devel

It works for me. And if you also miss gcc, then

zypper in gcc
like image 91
Hong Avatar answered Oct 06 '22 14:10

Hong


For those with similar issues I got this working by.

Uninsalling ruby and rvm Building zlib from source with the shared option

./configure --shared
make 
make install

I did the same for Ruby and that worked.

I could not get any RPM, Zypper, RVM installers to install properly. In each case they all seemed to have issues with zlib ?

like image 39
Brian McAuliffe Avatar answered Oct 06 '22 15:10

Brian McAuliffe