Centos 下安装Ruby和rubygems

前端之家收集整理的这篇文章主要介绍了Centos 下安装Ruby和rubygems前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

安装ruby
yum install ruby

装好以后测试一下
ruby -v
ruby 1.8.7 (2012-06-29 patchlevel 370) [i386-linux]
ok 已经变成1.8.7 了

安装rubygems
yum install rubygems

然后我想安装jekyll

gem install jekyll
等了好几分钟,报错如下

Building native extensions.  This could take a while...
ERROR:  Error installing jekyll:
        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/ffi-1.9.14 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/ffi-1.9.14/ext/ffi_c/gem_make.out
原文链接:https://www.f2er.com/centos/379252.html

猜你在找的CentOS相关文章