尝试在 Mountain Lion 上安装 Rails 时,我似乎遇到了冲突。我曾尝试更新 Ruby,但这并没有帮助。我也尝试了 Rails Installer,但这也给出了错误。Ruby 版本是 1.8.7
这是我从终端得到的错误
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
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/atomic-1.1.10 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/atomic-1.1.10/ext/gem_make.out