Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Did I install Ruby 1.9.3 correctly on RHEL?

Before you say yum -y install ruby193... I did that.

Please note that I am not a Ruby developer, but need this program as part of another developer's work via web services. (He is not available.) Any help would be greatly appreciated.

I attempted to install a library per instructions and got:

[root@ctbroker console]# gem install json -v '1.8.0'
Building native extensions.  This could take a while...
ERROR:  Error installing json:
ERROR: Failed to build gem native extension.  /opt/rh/ruby193/root/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /opt/rh/ruby193/root/usr/share/include/ruby.h
Gem files will remain installed in /opt/rh/ruby193/root/usr/local/share/gems/gems/json-1.8.0 for inspection.
Results logged to /opt/rh/ruby193/root/usr/local/share/gems/gems/json-1.8.0/ext/json/ext/generator/gem_make.out

I noticed that ruby.h is only on the machine at /usr/lib64/ruby/1.8/x86_64-linux/ruby.h.

What am I missing?

like image 282
Jerry Avatar asked Sep 20 '13 13:09

Jerry


1 Answers

I was able to to fix this problem on my system by running:

sudo yum install ruby193-ruby-devel.x86_64
like image 82
user3362935 Avatar answered Sep 18 '22 01:09

user3362935