1.9 on OS X


#1

What is the best way to install Ruby 1.9 on Apple OS X?

The latest version in fink is 1.8.6, which I’m currently using. I did
not see this discussion in the c.l.r archives, but please feel free to
point me to them.


#2

Jeff S. wrote:

What is the best way to install Ruby 1.9 on Apple OS X?

The latest version in fink is 1.8.6, which I’m currently using. I did
not see this discussion in the c.l.r archives, but please feel free to
point me to them.

Download the tarball from ruby-lang.org, configure, make, make install.

Make sure you’ve got /usr/local at the beginning of your $PATH, or, if
you want to use 1.9 alongside 1.8.6, use the --program-suffix= option to
append “19” to the executable names. Use “./configure --help” for more
information.


#3

Tim H. wrote:

Make sure you’ve got /usr/local at the beginning of your $PATH, or, if
you want to use 1.9 alongside 1.8.6, use the --program-suffix= option to
append “19” to the executable names. Use “./configure --help” for more
information.

Thanks. Ordinarily, when I do that dance, I use --prefix to install
multiple versions in different directories, and to make uninstallation
feasible.

Once I have two versions installed, how do I tell (e.g.) Rails which
version to use?


#4

On Sun, Mar 1, 2009 at 10:09 PM, Tim H. removed_email_address@domain.invalid wrote:

Jeff S. wrote:

What is the best way to install Ruby 1.9 on Apple OS X?
Download the tarball from ruby-lang.org, configure, make, make install.

Make sure you’ve got /usr/local at the beginning of your $PATH, or, if you
want to use 1.9 alongside 1.8.6, use the --program-suffix= option to append
“19” to the executable names. Use “./configure --help” for more information.

YMMV but i had some trouble with gem executable conflicts using the
program-suffix scheme. Also with she-bang lines in scripts.

I’ve had much less trouble with 1.9 in its own sandbox (e.g. under
/usr/local/ruby-1.9) and a little script to modify my $PATH whenever i
want to switch between 1.8 and 1.9.

And for the sake of completeness i should mention macports has a
ruby19 package (which installs with the aforementiond suffixes by
default).

Solidarity,
lasitha.


#5

On 1 mars 09, at 17:13, Jeff S. wrote:

What is the best way to install Ruby 1.9 on Apple OS X?

MacPorts, which allows to install and use both Ruby 1.8 and Ruby 1.9
at the same time.


#6

As already mentioned, MacPorts works fine. It gives you the option of
having separate binaries for 1.8 & 1.9 (ruby1.8 / ruby1.9, irb1.8 /
irb1.9…) or having only one (ruby, irb). But with the last option
you can’t have both versions installed at the same time, although you
can activate & deactivate ports pretty fast.


#7

Luc H. wrote:

On 1 mars 09, at 17:13, Jeff S. wrote:

What is the best way to install Ruby 1.9 on Apple OS X?

MacPorts, which allows to install and use both Ruby 1.8 and Ruby 1.9
at the same time.

I used MacPorts to install 1.9.1 alongside 1.8 – totally painless. Then
if you want to use
irb with 1.9, simply type “irb19” in Terminal and you will be running
under 1.9.1. (Check
this using “RUBY_VERSION” in Terminal with irb running).

I’m not sure about Rails, but I simply altered my shebang line and Ruby
1.9.1 is
working in Textmate:

#!/opt/local/bin/ruby1.9

Macports installs ruby19 into /opt/local/bin along with a few other
files.

vince