我正在尝试安装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”'时,我有:
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.
当我使用ruby 1.9.3时,我有同样的错误。 请帮帮我
答案 0 :(得分:2)
我和你有同样的问题。问题已经显示您在本地mashine上没有ruby-dev和sqlite-dev库。尝试安装它"
答案 1 :(得分:0)
我发现这个答案关于缺少Ruby头文件来做快速谷歌:
“许多软件包分为'foo'和'foo-devel',其中'foo-devel'包含头文件。是否有可以安装的'ruby-devel'软件包?”
您是否可以安装开发工具包,然后重试?