Update latest Ruby Version 1.9 on Mac OSX

Dear All,

How can I Update latest Ruby Version 1.9 ?

I still use Ruby v1.8.6 version on Mac OSX 10.5.6

best regards,

Salai.

On Thu, Mar 26, 2009 at 10:40 AM, Thomas K. [email protected]
wrote:

How can I Update latest Ruby Version 1.9 ?

I still use Ruby v1.8.6 version on Mac OSX 10.5.6

Install it separately instead of upgrading.

Download the source and ./configure --program-suffix=19

Then you have ruby19, irb19, etc at your disposal.

jeremy

Just install MacPorts and then install 1.9

On 26 mars 09, at 19:37, Florian G. wrote:

Ports is stuck at 1.9.1-preview1.

% port info ruby19
ruby19 @1.9.1-p0 (lang, ruby)

Try a port sync, that might help :stuck_out_tongue:

On Mar 26, 2009, at 6:42 PM, Jeremy K. wrote:

Then you have ruby19, irb19, etc at your disposal.

jeremy

The release version of Ruby 1.9 automatically configures itself to use
ruby19.

Ports is stuck at 1.9.1-preview1.

I would advice at not messing with the preinstalled version[1], as
there is a lot
of software depending on it.

Regards,
Florian

[1]: which is not hard, because it’s outside of the scope where normal
*nix Software messes around.


Florian G.

smtp: [email protected]
jabber: [email protected]
gpg: 533148E2

On Mar 26, 2009, at 8:43 PM, Luc H. wrote:

On 26 mars 09, at 19:37, Florian G. wrote:

Ports is stuck at 1.9.1-preview1.

% port info ruby19
ruby19 @1.9.1-p0 (lang, ruby)

Try a port sync, that might help :stuck_out_tongue:

Oh, the embarassment…

Regards,
Florian :wink:


Florian G.

smtp: [email protected]
jabber: [email protected]
gpg: 533148E2

Christian wrote:

Just install MacPorts and then install 1.9

Hi! I installed ruby19 with macports (1.8.0) on Leopard, but still can’t
use ruby 1.9.

ruby -v: 1.8.6

which ruby: /usr/bin/ruby

.profile:

DELUXE-USR-LOCAL-BIN-INSERT

(do not remove this comment)

echo $PATH | grep -q -s “/usr/local/bin”
if [ $? -eq 1 ] ; then
PATH=$PATH:/usr/local/bin
export PATH
fi

Your previous /Users/stratboy2/.profile file was backed up as

/Users/stratboy2/.profile.macports-saved_2009-02-22_at_15:45:25

MacPorts Installer addition on 2009-02-22_at_15:45:25: adding an

appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH

Finished adapting your PATH environment variable for use with

MacPorts.

MacPorts Installer addition on 2009-02-22_at_15:45:25: adding an

appropriate MANPATH variable for use with MacPorts.
export MANPATH=/opt/local/share/man:$MANPATH

Finished adapting your MANPATH environment variable for use with

MacPorts.


So, what’s wrong?
Can you please help me? I’m not too good in unix/terminal…

On Sat, Aug 29, 2009 at 9:41 AM, Luca R.[email protected]
wrote:

Christian wrote:

Just install MacPorts and then install 1.9

Hi! I installed ruby19 with macports (1.8.0) on Leopard, but still can’t
use ruby 1.9.

ruby -v: 1.8.6

which ruby: /usr/bin/ruby

I’m not sure because I installed Ruby 1.9 from source, but others have
said that macports installs ruby 1.1 with the suffix 19, so as not to
conflict with the base install.

If so ruby19 should get you there.

The hot ticket these days for managing multiple versions of Ruby on OS
X and Linux is the rvm gem

http://rvm.beginrescueend.com/

I haven’t tried yet, but probably will look at it myself after I
finish migrating to Snow Leopard.


Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale

On Sat, Aug 29, 2009 at 3:41 PM, Luca R.[email protected]
wrote:

Christian wrote:

Just install MacPorts and then install 1.9

Hi! I installed ruby19 with macports (1.8.0) on Leopard, but still can’t
use ruby 1.9.

ruby -v: 1.8.6

which ruby: /usr/bin/ruby

I had /usr/local/bin in /etc/profile and it was being ignored after
upgrade to SL.

I’ve not investigated why, but by trial and error I discovered that
/etc/paths no honors order (if I am not mistaked it didn’t, or the
system ignored extra entries… don’t remember the exact gotcha but
there was one).

So my /etc/profile, /etc/bashrc and /etc/paths.d are system defaults
now, and just edited /etc/paths to put /usr/local/bin at the top.

Note that for MacPorts it’s /opt/local/bin, not /usr/local/bin.
Also, in OS X the preferred way of setting environment variables is via
.MacOS/environment.plist:

Hope this helps,
-Mario.


I want to change the world but they won’t give me the source code.

Salai Koko wrote:

Dear All,

How can I Update latest Ruby Version 1.9 ?

I still use Ruby v1.8.6 version on Mac OSX 10.5.6

best regards,

Salai.

I would use RVM (ruby version manager)

gem install rvm
then
rvm-install
and follow the instruktions, you can install multiple ruby
implementations and switch between them on the fly

Add /opt/local/bin to the front of your PATH, that’s where MacPorts
stores
its binaries.

On Aug 29, 2009 3:45 PM, “Luca R.” [email protected] wrote:

Christian wrote:

Just install MacPorts and then install 1.9

Hi! I installed ruby19 with macports (1.8.0) on Leopard, but still can’t
use ruby 1.9.

ruby -v: 1.8.6

which ruby: /usr/bin/ruby

.profile:

DELUXE-USR-LOCAL-BIN-INSERT

(do not remove this comment)

echo $PATH | grep -q -s “/usr/local/bin”
if [ $? -eq 1 ] ; then
PATH=$PATH:/usr/local/bin
export PATH
fi

Your previous /Users/stratboy2/.profile file was backed up as

/Users/stratboy2/.profile.macports-saved_2009-02-22_at_15:45:25

MacPorts Installer addition on 2009-02-22_at_15:45:25: adding an

appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH

Finished adapting your PATH environment variable for use with

MacPorts.

MacPorts Installer addition on 2009-02-22_at_15:45:25: adding an

appropriate MANPATH variable for use with MacPorts.
export MANPATH=/opt/local/share/man:$MANPATH

Finished adapting your MANPATH environment variable for use with

MacPorts.


So, what’s wrong?
Can you please help me? I’m not too good in unix/terminal…

Thanks to all, I’ll try each way, then post back to let you know! Thank
you all again!

Another little question then: how do I know which ruby version is used
by my current rails?