How to completely reinstall my rails environment on Mac Lion?

Hi,
I was learning rails and have completed some projects. On my laptop
everything worked for quite some time. However now when I run rails new
testapp, for example it doesn’t generate even the first testapp. How can
I
completely reinstall a rails environment on my mac? I ran several step
by
step tutorials how to do this, but it seems that the old rails
environment
is conflicting. I also downloaded Xcode already, tried rvm, tried
Homebrew
everything seems. It just doesnt work.

Help. I want to continue developing.

$gem uninstall rails -a

… will un-install all versions of rails.

$gem install rails

… puts it back again.

You can check your rails version before and after by doing:

$rails -v

gem list | cut -d" " -f1 | xargs sudo gem uninstall -aIx
THIS COMMAND WILL UNINSTALL ALL THE GEMS IN UR SYSTEM .AFTER THAT
INSTALL
AGAIN WHAT YOU NEED.

I would also recommend using rvm - ruby version manager. It allows you
to easily install and switch between versions of ruby and maintain
multiple sets of gems…to include rails.