Screwed up my Terminal [and/or XCode] trying to setup Dev Environment

Jun 4, 2012
Reaction score
So I'm trying to set up a developer environment for Ruby on Rails on my Macbook Pro running Lion 10.7.3.

Following this guide: How to install Xcode, Homebrew, Git, RVM, & Ruby 1.9.3 on Snow Leopard & Lion - Moncef Belyamani

I went to the Mac Store and installed XCode, as the Command Line Tools. I installed gcc and homebrew through the command prompt as instructed, however this is where I started running into problems.

When I ran brew doctor to check if my system was "raring to brew" i got this output:

Warning: Your Xcode is configured with an invalid path.
You should change it to the correct path. Please note that there is no correct
path at this time if you have *only* installed the Command Line Tools for Xcode.
If your Xcode is pre-4.3 or you installed the whole of Xcode 4.3 then one of
these is (probably) what you want:

    sudo xcode-select -switch /Developer
    sudo xcode-select -switch /Applications/

Beeing a fool, I selected the first option and submitted
sudo xcode-select -switch /Developer
and moments later realized the tutorial said to submit the second option
sudo xcode-select -switch/Applications/
Now, no matter what I enter into the terminal I always get the following:

-bash: install: command not found
-bash: ruby: command not found
-bash: sudo: command not found

So for example if I call up "brew doctor" on terminal it will say that my Xcode is configured with an invalid path and try to resubmit the second code: "sudo xcode-select -switch/Applications/" it still says "-bash: sudo: command not found"

Also this may be helpful in diagnosing the problem as I suspect it's where things went wrong.

Niklas-Kunkels-MacBook-Pro:~ Niklas$ echo $PATH
I've been told to delete a bunch of plist files that bash loads whenever you open a new terminal session, however am having trouble finding them.


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question