Error installing rails

Hi, I am installing new servers. I install rails on Amazon Linux

Installed list: -Rubin -Development Tools -gems -zlib -develop -readline-Devel

I'm trying to set the rails and now I'm stuck here

$ sudo gem install rails Create your own extensions. This may take some time ... 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 be installed in / usr / lib 64 / ruby ​​/ gems / 1.8 / gems / json-1.6.3 for verification. The results are logged in / usr / lib 64 / ruby ​​/ gems / 1.8 / gems / json-1.6.3 / ext / json / ext / parser / gem_make.out

Is there a problem with this json library

+5
source share
4


yum install ruby-devel
yum install make
yum install gcc
+14

Ruby 1.9.x, Ruby:

sudo yum install ruby19

sudo yum install ruby19-devel
sudo yum install make
sudo yum install gcc
+5

rvm, , rvm gem install rails

+1

The problem has nothing to do with RVM. The problem is that you need ruby ​​source header files. Compile ruby ​​from the source (RVM does this) or set the appropriate headers for your ruby ​​version.
What is amazon linux (no such thing)? is it ubuntu or what?
How did you install the ruby? what does ruby ​​-v say?

-3
source

All Articles