Installing Ruby Debug IDE Gem

徘徊边缘 提交于 2019-12-13 02:19:34

问题


I am trying to install ruby-debug-base but there seems to be an issue finding a path to my Xcode 4.5.2 commandline tools?

Looks like the error is being caused by my commandline tools being installed here: /usr/bin/xcodebuild

not here: /Developer/usr/bin/xcodebuild

Has anyone run into this pathing issue? How can I resolve it? I do use Xcode for iOS development and it works fine.

Thanks!

admin$ sudo gem install ruby-debug-base      

Building native extensions.  This could take a while...
ERROR:  Error installing ruby-debug-base:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
creating Makefile

make
xcrun cc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE  -fno-common  -pipe -fno-common   -c trace_nums.c

sh: /Developer/usr/bin/xcodebuild: No such file or directory
/Developer/usr/bin/xcodebuild fails with 32512 - Unknown error: 32512

make: *** [trace_nums.o] Error 69


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

回答1:


I solved this by going to the "Locations" tab found in

Xcode > Preferences > Downloads

Once there, I noticed that the dropdown box for "Command Line Tools" did not have a version of Xcode selected and there was a small alert icon next to the dropdown box.

After clicking on the dropdown box, I selected the sole version (4.5.2) that was given as an option in the dropdown.

I then had to accept the Xcode end-user agreement from the command line and then all was good.

sudo xcodebuild -license



来源:https://stackoverflow.com/questions/13459937/installing-ruby-debug-ide-gem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!