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:

/usr/bin:/usr/local/lib/ruby/gems/1.8:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/usr/local/git/bin/:/opt/local/bin:/Users/richard/bin/bin/:/usr/local/bin

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 /usr/local/bin/ruby richard-s-macbook-pro:restapp richard$ which rails /usr/bin/rails richard-s-macbook-pro:restapp richard$ which rake /usr/bin/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 /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/usr/local/git/bin/:/opt/local/bin:/Users/richard/bin/bin (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

http://pastie.org/562566d

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.

HTH,