Two Installations of Ruby

I’m running Mac OS 10.4.9 with Ruby 1.8.2 installed by default. I
updated to 1.8.6 but I installed it in /Users/jeremy/bin instead of
the default /usr/bin/ So when I go to “ruby -v” it still says 1.8.2.
How do i either move ruby into the correct directory or how do I
change the path to ruby to the new directory? I’d prefer to move
1.8.6 to a different spot outside of my home directory.

Thanks,
Jer

Type this into terminal:
export PATH=/Users/jeremy/bin:$PATH

Great! But when I close Terminal it’s back to the default. How do I
keep this way?

Fred P. wrote:

Ah right, forgot about that. edit your ~/bashrc file to read:

PATH=PATH=/Users/jeremy/bin:$PATH

Two things: a) It’d have to be export PATH=/Users/jeremy/bin:$PATH
b) bash isn’t the default shell on OSX, so he’d have to put it into the
~/.tcshrc or whatever shell he’s using.

HTH,
Sebastian

On 5/22/07, Sebastian H. [email protected] wrote:

b) bash isn’t the default shell on OSX, so he’d have to put it into the
~/.tcshrc or whatever shell he’s using.

Um… Maybe in 10.1 or 10.2, but it’s been default 10.3 on up, IIRC

Gregory B. wrote:

On 5/22/07, Sebastian H. [email protected] wrote:

b) bash isn’t the default shell on OSX, so he’d have to put it into the
~/.tcshrc or whatever shell he’s using.

Um… Maybe in 10.1 or 10.2, but it’s been default 10.3 on up, IIRC

Oh, my knowledge must be out of date then. Sorry for spreading
misinformation.

Ah right, forgot about that. edit your ~/bashrc file to read:

PATH=PATH=/Users/jeremy/bin:$PATH

or similar

Is it possible to install the new version of Ruby over the old on OS X?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If you compile from source, you may have to use
–prefix=/path/to/old/install when configuring or manually edit the
config
files.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFGU2IF2vy7v+d+psQRAvszAJ4u3fuKPfgPHqMtDyCzuCKi8/lEkACeJejo
jK/t9b9GlHxXBtURyd+7gj4=
=PjeY
-----END PGP SIGNATURE-----

highlyjhi wrote:

Is it possible to install the new version of Ruby over the old on OS X?

Yes, but you probably don’t want to.

If you let the ./configure script use the default --prefix, Ruby will
get installed in /usr/local. Then all you have to do is add /usr/local
to your PATH in your ~/.profile file in front of the default PATH, like
this:

export PATH=/usr/local:$PATH

You can read about PATH and .profile by entering

man bash

in a Terminal window, or just Google it.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs