ruby update on OS X 10.5 and I now this: "Rails requires RubyGems >= 1.3.2"

Hi all,

I've seen other messages on this problem, but I still can't get back to working with Rails after using MacPorts to install a recent version of ruby on my mac OS X 10.5 (ruby 1.8.7.)

I'm getting: "Rails requires RubyGems >= 1.3.2."

In fact, I am running rubygems 1.3.5.

Here are some settings of mine that seemed important in previous posts on this issue:

which ruby... /opt/local/bin/ruby

which gem... /usr/bin/gem

My path variable seems consistent with the "which ruby" result above.

Do I need to change the path -- or any other -- settings in RubyGems?

Thanks for any help,

Grary

Hi all,

I've seen other messages on this problem, but I still can't get back to working with Rails after using MacPorts to install a recent version of ruby on my mac OS X 10.5 (ruby 1.8.7.)

I'm getting: "Rails requires RubyGems >= 1.3.2."

In fact, I am running rubygems 1.3.5.

Here are some settings of mine that seemed important in previous posts on this issue:

which ruby... /opt/local/bin/ruby

which gem... /usr/bin/gem

You have two installs of ruby, one in /opt/local, one in /usr/bin and the two have different versions of rubygems - if your PATH has /opt/ local/bin higher up then the /opt/local install of ruby might not have rubygems at all. Sounds like you need to install rubygems for your new ruby install

Fred

Fred,

Per your comment...

"...if your PATH has /opt/local/bin higher up then the /opt/local install of ruby might not have rubygems at all. Sounds like you need to install rubygems for your new ruby install"

...yes, here is my path:

/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ local/bin:/usr/X11/bin:/opt/local/bin/ruby

So, you're recommending that I install RubyGems anew? Can't I modify the recognition of my new ruby installation for RubyGems?

Thanks,

Grar

Well you could try transplanting the various bits of rubygems from one ruby install to another but even if you knew exactly what to move around that might not work (eg gems with native extensions compiled against different version of ruby).

Fred

Fred,

I'm just hoping to get Rails working again, so I'll do whatever's easy...

sudo gem install rubygems-update sudo update_rubygems

...I still get the same message.

What did you mean when you wrote: "Sounds like you need to install rubygems for your new ruby install"?

Thanks,

Grar

That's because you're installing rubygems-update using gem which is usr/bin/gem (ie the previous ruby install). You need a fresh install of rubygems - grab it off the rubygems download page (http://rubyforge.org/projects/rubygems/ - you want zip file or the tarball)

Fred

Fred,

Thanks. I reinstalled the whole thing such that

which ruby /opt/local/bin/ruby

which gem /opt/local/bin/gem

Rails now seems to respond as desired.

Doubtless I'll need to better familiarize myself with the interaction of ruby and rubygems for further growth in Rails.

best,

Grar

Just to be clear -- this has NOTHING to do with ruby, gems, or rails specifically. This is learning basic *nix -- how the PATH environment variable determines what executables are found.

You would face the same issue with multiple installations of any other languages or apps.

FWIW,