Ruby Install/Upgrade OS X Panther 10.3

J

jotto

I have Mac OS X 10.3 or Panther if you will. I am looking for
clarification on upgrading Panther's built in Ruby to the latest
version. I have tried downloading, configuring, making, making
install... but then what. That's where the tutorials go dry. How do I
run the install, or is the install run when you type make install? When
I type ruby -v at the shell I still get 1.6.8!
 
D

Dave Thomas

I have Mac OS X 10.3 or Panther if you will. I am looking for
clarification on upgrading Panther's built in Ruby to the latest
version. I have tried downloading, configuring, making, making
install... but then what. That's where the tutorials go dry. How do I
run the install, or is the install run when you type make install? When
I type ruby -v at the shell I still get 1.6.8!

When you installed, did you install into /usr/local/bin? If so, is it
in your path (probably not by default).

Try running /usr/local/bin/ruby -v

If that's now 1.8.2, you can add /usr/local/bin to the front of your
path.

On my box, I install 1.8.2 directly into my home directory by
specifying a prefix when I build it:

./configure --prefix=/Users/dave/ruby_1.8
make
make install

I then add /Users/dave/ruby_1.8/bin to the front of my path, and run it
from there.
 
J

jotto

Yes, it definitely is 1.8.2 in /usr/local/bin. What does it mean to add
it to the front of my path, just type that out every time I want to
access the newer version of Ruby? Or do I edit some shell file? Where
is that file? How can I open it?
 
S

Sam Roberts

Quoteing (e-mail address removed), on Fri, Jan 07, 2005 at 12:41:30AM +0900:
Yes, it definitely is 1.8.2 in /usr/local/bin. What does it mean to add
it to the front of my path, just type that out every time I want to
access the newer version of Ruby? Or do I edit some shell file? Where
is that file? How can I open it?

Your path is the value of the PATH environment variable. It is a list of
directories to search for executable files. Use "env" to see your
environment.

You need to add something like:

setenv PATH "/usr/local/bin:$PATH"

to either your ~/.cshrc or ~/.tcshrc file.

I would highly suggest buying a book about how to use the Unix
underpinnings of OS X. It will cover this, and also how to edit files.

The syntax above may not be exact, I use OS X, but not tcsh.

Cheers,
Sam
 
J

Jim Menard

jotto said:
Yes, it definitely is 1.8.2 in /usr/local/bin. What does it mean to add
it to the front of my path, just type that out every time I want to
access the newer version of Ruby? Or do I edit some shell file? Where
is that file? How can I open it?

The file ~/.bash_profile gets executed when you log in and the file ~/.bashrc
gets executed when you open a Terminal window. I'd put something like this
into ~/.bash_profile:

export PATH=/usr/local/bin:$PATH


Jim
 
J

James Edward Gray II

The syntax above may not be exact, I use OS X, but not tcsh.

And bash is now the default OS X shell. See Jim Menard's response if
that's your shell.

James Edward Gray II
 
R

Ryan Davis

Yes, it definitely is 1.8.2 in /usr/local/bin. What does it mean to add
it to the front of my path, just type that out every time I want to
access the newer version of Ruby? Or do I edit some shell file? Where
is that file? How can I open it?

It is twofold. Fix your path ala the other email in this thread. You
should also do the following:

cd /usr/bin
sudo mv ruby ruby16
sudo mv irb irb16

If you have any scripts that use /usr/bin/ruby you might also want to
make symbolic links to /usr/local/bin/ruby, but honestly it is just
better to fix the shebangs to point to /usr/local/bin/ruby (my pref) or
use env ruby to find the right one dynamically.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top