2013-05-03 110 views
0

我试图安装rails,但有一些问题: ruby 2.0.0 rvm 1.19.6 gems 2.0.3 bundler 1.2.3 当我运行'bundle install'或'gem install json -v 1.7.7“ ',我有:rails捆绑错误Gem :: Installer :: ExtensionBuildError:错误


Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

       /usr/bin/ruby1.9 extconf.rb 
mkmf.rb can't find header files for ruby at /usr/lib64/ruby/include/ruby.h 


Gem files will remain installed in /home/Hiken/.bundler/tmp/16909/gems/json-1.7.7 for inspection. 
Results logged to /home/Hiken/.bundler/tmp/16909/gems/json-1.7.7/ext/json/ext/generator/gem_make.out 
An error occurred while installing json (1.7.7), and Bundler cannot continue. 
Make sure that `gem install json -v '1.7.7'` succeeds before bundling. 

当我使用红宝石1.9.3我有同样的错误。 帮助我,请

回答

2

我和你有同样的问题。问题出现在你的本地mashine上没有ruby-dev和sqlite-dev库。尝试安装它“

0

,我发现这个答案大概从做一个快速谷歌丢失的红宝石头文件:

“许多软件包被分成‘富’和‘富-devel的’,其中‘富-devel的’有头文件,是否有可以安装的'ruby-devel'软件包?“

是否有开发工具包可以安装并再次尝试?