我已经安装了它显示错误的宝石:
gem install --local /home/harish/Downloads/json-1.8.0.gem
Building native extensions. This could take a while...
ERROR: Error installing /home/harish/Downloads/json-1.8.0.gem:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h
Gem files will remain installed in /home/harish/.gem/ruby/1.9.1/gems/json-1.8.0 for inspection.
Results logged to /home/harish/.gem/ruby/1.9.1/gems/json-1.8.0/ext/json/ext/generator/gem_make.out
答案 0 :(得分:4)
我假设您使用的是Debian派生词。试试这个:
sudo apt-get install ruby1.9-dev
对于Fedora,试试这个:
sudo yum install ruby-devel