我正在使用 Mac OS X (Lion) 附带的 Ruby 1.8.7 的“库存”版本,当我尝试安装 Rails 时,出现缺少头文件的错误。我该如何解决?
谢谢
sudo gem install rails
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h