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

Naively thinking I could fix it myself, I tried uninstalling Xcode by deleting it from the applications folder, however upon further review trying to reinstall it from the App Store I found the App Store still thinks Xcode is installed.

I found command prompts on Google to fully uninstall Xcode, however since my terminal doesn't respond to commands I can't uninstall -> reinstall Xcode.

Thanks for your help guys,
- Nik

EDIT: 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 seshion, however am having trouble finding them.'

EDIT2: I've managed to reinstall XCode, however the terminal still won't recognize most commands I input such as "gcc --version" despite ruby having been installed