[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

1.9 on OS X

Jeff Schwab

3/1/2009 4:11:00 PM

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.
6 Answers

Tim Hunter

3/1/2009 4:40:00 PM

0

Jeff Schwab 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.

--
RMagick: http://rmagick.ruby...

Jeff Schwab

3/1/2009 4:50:00 PM

0

Tim Hunter wrote:
> Jeff Schwab 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.

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?

lasitha

3/1/2009 4:55:00 PM

0

On Sun, Mar 1, 2009 at 10:09 PM, Tim Hunter <TimHunter@nc.rr.com> wrote:
> Jeff Schwab 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.

Luc Heinrich

3/1/2009 6:16:00 PM

0

On 1 mars 09, at 17:13, Jeff Schwab 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.

--
Luc Heinrich - luc@honk-honk.com


Vince Angeloni

3/1/2009 7:33:00 PM

0

Luc Heinrich wrote:
> On 1 mars 09, at 17:13, Jeff Schwab 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
--
Posted via http://www.ruby-....

arcadio

3/1/2009 8:28:00 PM

0

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.