0

I run sudo gem install localtunnel and I get the following output. Now I am used homebrew to instal rbenv to install ruby and when i run brew doctor it says xcode is out of date but when i open up xcode and go to about it is the newest version, here is my error output for sudo gem install localtunnel

ERROR:  Error installing localtunnel:
    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-darwin12.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I. -DJSON_GENERATOR  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -arch i386 -arch x86_64 -g -O3 -pipe -fno-common -DENABLE_DTRACE  -fno-common  -pipe -fno-common   -c generator.c
xcrun: Error: could not stat active Xcode path '/Developer'. (No such file or directory)
cc -arch i386 -arch x86_64 -pipe -bundle -undefined dynamic_lookup -o generator.bundle generator.o -L. -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L. -arch i386 -arch x86_64     -lruby  -lpthread -ldl -lobjc  
i686-apple-darwin11-llvm-gcc-4.2: generator.o: No such file or directory
i686-apple-darwin11-llvm-gcc-4.2: generator.o: No such file or directory
lipo: can't figure out the architecture type of: /var/tmp//ccfplODR.out
make: *** [generator.bundle] Error 1
Cool Guy Yo
  • 5,910
  • 14
  • 59
  • 89

2 Answers2

1

Xcode 4 is not installed in /Developer anymore, but xcrun seems to expect it there.

I would install the "Command Line Tools" first (Xcode preferences -> Downloads -> Components).

If that does not help, call

sudo xcode-select -switch /Applications/Xcode.app

to explicitly set the path for xcrun.

Martin R
  • 529,903
  • 94
  • 1,240
  • 1,382
  • I have command line tools installed already and running that command outputs xcode-select: Error: Path "/Applications/Xcode.app" is not a directory. – Cool Guy Yo Feb 19 '13 at 18:04
  • @AndersKitson: So where have you installed the Xcode application? – Martin R Feb 19 '13 at 18:08
  • well I installed it with app store so I would assume the default applications folder. – Cool Guy Yo Feb 19 '13 at 18:16
  • @AndersKitson: You can right-click on the Xcode icon and choose "Options->Show in Finder" to see the install location. – Martin R Feb 19 '13 at 18:18
  • oh weird it installed at /Volumes/SANDBOX/Applications now that is my partition i created and installed a different setup of my os. So how would I install xcode since app store thinks its already installed but its on a different partition? – Cool Guy Yo Feb 19 '13 at 18:25
  • @AndersKitson: I have no idea! Perhaps you can unmount the partition in Disk Utility and then download from the App Store again. - Or you just copy the Xcode.app bundle to you /Applications folder. – Martin R Feb 19 '13 at 18:31
  • I unmounted and installed xcode with commandline tools ran brew doctor Im raring to brew but even after running yout xcode-select-switch command I am getting the same error for installing local tunnel – Cool Guy Yo Feb 19 '13 at 21:27
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/24789/discussion-between-martin-r-and-anders-kitson) – Martin R Feb 19 '13 at 21:36
0

My Ruby Version was out of date, I had to run rbenv install 1.9.3-p0 and than set it to the global.

Cool Guy Yo
  • 5,910
  • 14
  • 59
  • 89