安裝

2013-01-18 118 views
0

我試圖在OS X Lion的安裝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 


Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/json-1.7.6 for inspection. 
    Results logged to /Library/Ruby/Gems/1.8/gems/json-1.7.6/ext/json/ext/generator/gem_make.out 

任何幫助,將不勝感激。

回答

0

首先在最新的Xcode-Version中安裝命令行工具。

,然後運行sudo gem install rails

要安裝的命令行工具,去的XCode首選項>下載。