1
votes

I have been trying and trying and I can't get past this error. I have Ruby version 1.8.7 and Gem version 2.1.11 and I am trying to install open project and I keep coming up with this error

Installing json (1.8.1) Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb 

mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h

Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/json-1.8.1 for inspection. Results logged to /usr/lib/ruby/gems/1.8/gems/json-1.8.1/ext/json/ext/generator/gem_make.out

Any help will be appreciated...

Best,

Mike

An error occurred while installing json (1.8.1), and Bundler cannot continue. Make sure that gem install json -v '1.8.1' succeeds before bundling. ==> Something went wrong :( ==> Installation aborted.

1
Oh, and I am also using SUSE Enterprise.Michael W.
You sure the gem you are trying to install is compatible with such an old version of ruby? Why don't you upgrade to 2.0?Severin
that is a great idea. Let me try that now.Michael W.
I tried updating Ruby and this is what I got..Michael W.
rror running 'requirements_opensuse_libs_install libffi-devel libopenssl-devel readline-devel zlib-devel', showing last 15 lines of /root/rvm/log/1386501671_ruby-1.8.7-p371/package_install_libffi-devel_libopenssl-devel_readline-devel_zlib-devel.log (it won't let me install these packages) any ideas? This is a project for work. Getting frustrated with this now. :-)Michael W.

1 Answers

0
votes

Running sudo gem install json worked for me. Note: running gem install json did not work.