1
我使用隨我的Mac OS X(Lion)附帶的Ruby 1.8.7的「庫存」版本,當我嘗試安裝Rails時,我得到缺少頭文件錯誤的錯誤。我該如何解決?Ruby Gem安裝問題
感謝
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
您是否安裝了XCode「Command Line Tools」軟件包? – tadman
不,我不知道。現在安裝...謝謝 – Slinky
安裝命令行工具修復了它。謝謝 – Slinky