4

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
the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Brian McAuliffe
  • 2,099
  • 1
  • 16
  • 13
  • Are you sure the headers are installed? If you've installed Ruby using a package manager, it's very common for the headers to not be installed. Plus, it looks like you're running Ruby 1.8. You should be looking at using something more current, 2.0+ is a good start. And, you should look into using [RVM](http://rvm.io/rvm/install) (read the entire installation page) or [rbenv](https://github.com/sstephenson/rbenv) to install Ruby in a sandbox and not mess with the system installation of Ruby. – the Tin Man Jan 09 '14 at 17:43
  • I tried that but the RVM seems to have issues with the SUSE SLE Repo. – Brian McAuliffe Jan 14 '14 at 16:45
  • won't solve this problem but it's worth knowing you could add this repo in case you were not aware http://download.opensuse.org/repositories/devel:/languages:/ruby:/extensions/SLE_11_SP3/ as it's probably handy to have. – Magpie Apr 09 '14 at 04:26

3 Answers3

9
zypper in ruby-devel

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

zypper in gcc
Hong
  • 1,203
  • 1
  • 13
  • 18
1

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 ?

Brian McAuliffe
  • 2,099
  • 1
  • 16
  • 13
0

You are possibly missing gcc. Try installing it with zypper (or yum), and then try installing your gems:

zypper in gcc
Sam
  • 884
  • 6
  • 15
  • Oh, ok. So it was make. Ya, with these errors its usually gcc or make. Glad you fixed it, Thanks. – Sam Jan 14 '14 at 17:15