OS X rails path problem

I have had rails up and running for about 2 years now, but while
troubleshooting an arduino problem, I inadvertently changed something
related to my path variable that caused scrip/server to no longer run,
after a reinstalling the basics... ruby-gems, etc... everything seemed
to run smoothly but now i cannot run rake.

I obviously have two versions of almost every gem on my system, but I
have no clue how to start cleaning up my machine. I want to point
everything to a single copy of my correct resources. Can anyone recomend
some good material on troubleshooting path/gem install issues, or just
some good solid resources on OS X/Unix architecture. I understand what a
path is, and what it does, but until now i've been mostly just doing
rather than understanding.

OS X 10.5.7

System information here: http://pastie.org/561126

From your pastie:


I would first remove '/usr/local/lib/ruby/gems/1.8' -- there shouldn't be
any executables in that directory. Also, you've got duplicate directories
in that PATH statement.

Then this:

richard-s-macbook-pro:restapp richard$ which ruby
richard-s-macbook-pro:restapp richard$ which rails
richard-s-macbook-pro:restapp richard$ which rake

If you type `ruby -v` is it the version you want?

If so, I suspect you have a /usr/local/bin/rails, /usr/local/bin/rake, etc.
but because /usr/bin is first in your PATH, they are not being used.

Open a new shell and set your PATH to
(is that last "bin/bin" correct?)

Then see what `which rake` produces.

You were right it was the /usr/bin in front and the
'/usr/local/lib/ruby/gems/1.8' that was screwing everything up


Everything works again, thanks! Besides the 'profile', 'bashrc', and
'bash_profile' are there any other common locations where the PATH
variable would be set? A few of those declarations could not be
accounted for in those three files.

Nothing comes immediately to my mind, but I suppose some errant
installer could do it, especially if you decided to CTRL-C out of the
middle of an install. :slight_smile:

Something to keep in mind, I suppose.