Reputation: 2847
I'm setting up servers. I'm installing rails on an Amazon Linux
Installed List: ruby, development tools, gems, zlib-devel, readline-devel.
I'm trying to install rails and now I'm stuck here
$ sudo gem install rails Building native extensions. This could take a while... ERROR: Error installing rails: 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/lib64/ruby/gems/1.8/gems/json-1.6.3 for inspection. Results logged to /usr/lib64/ruby/gems/1.8/gems/json-1.6.3/ext/json/ext/parser/gem_make.out
Is there a problem with this json library?
Upvotes: 5
Views: 4075
Reputation: 11890
You should be using Ruby 1.9.x, to upgrade Ruby:
sudo yum install ruby19
and also
sudo yum install ruby19-devel
sudo yum install make
sudo yum install gcc
Upvotes: 5
Reputation: 141
You need to install the following
yum install ruby-devel yum install make yum install gcc
Upvotes: 14
Reputation: 9845
THe problem has nothing to do with RVM. The problem is you need ruby source header files. Compile ruby from source(RVM does that) or install the appropiate headers for your ruby version.
What is amazon linux(there is not such thing) ? is it ubuntu or what ?
How did you installed ruby ? what does ruby -v says ?
Upvotes: -3