無法在Mac OS X 10.7.3 Lion上加載ruby-debug。無法在Mac OS X 10.7.3 Lion中加載ruby 1.8.7中的ruby-debug
不確定路徑不正確的原因。
Ruby版本是1.8.7標準與獅子標準。
安裝的Xcode
Developer Information:
Version: No version information available
Location: /Applications/Xcode.app
Applications:
Xcode: 4.3 (1175)
Instruments: 4.3 (4321)
SDKs:
Mac OS X:
10.6: (10K549)
10.7: (11D50a)
iPhone OS:
5.0: (9A334)
iPhone Simulator:
5.0: (9A334)
$ sudo gem install ruby-debug -v 0.10.4
Password:
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug:
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/linecache-0.46 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/linecache-0.46/ext/gem_make.out
$
尋找Lion系統上ruby.h路徑,該路徑的不同。
./Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/Headers/ruby.h
./Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0/ruby.h
./Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/Headers/ruby.h
./Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0/ruby.h
從這一點來看,最好的方法是什麼?
感謝,
PB
爲什麼Lion自帶的基礎ruby和gem無法安裝ruby-debug?我有紅寶石1.8.7基地249工作正常與紅寶石調試(0.10.3)在OS X 10.6.8。我明白你的建議,只是困惑爲什麼我不能用調試重建我的生產環境? – phil 2012-02-28 10:11:28
你是否經常使用sudo安裝gem? – igreulich 2012-02-28 17:16:22
在生產中是的,但在開發中,我把寶石放在〜home/usr。你有什麼建議? – phil 2012-02-28 21:37:45