在fedora 23上安装导轨时出错

时间:2016-02-25 15:05:38

标签: ruby-on-rails ruby

使用以下方法安装了Fedora 23.安装的ruby:

sudo yum install ruby

到目前为止一切都还不错。然后我试了一下:

sudo gem install rails 

之后,我收到了错误:

Fetching: nokogiri-1.6.7.2.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing rails:
ERROR: Failed to build gem native extension.

/usr/bin/ruby -r ./siteconf20160225-4730-qcjlvb.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /usr/local/share/gems/gems/nokogiri-1.6.7.2 for inspection.
Results logged to /usr/local/lib64/gems/ruby/nokogiri-1.6.7.2/gem_make.out

任何人都知道我在这里失踪了什么?

1 个答案:

答案 0 :(得分:0)

尝试sudo yum install ruby-devel

您需要安装Ruby开发环境来安装本机扩展,这些扩展是用C语言编写的。

您可能还需要gcc,可以使用sudo yum install gcc

进行安装