# Do I need to upgrade to the latest version of Ruby

**URL:** <https://www.ruby-forum.com/t/do-i-need-to-upgrade-to-the-latest-version-of-ruby/204950>\
**Category:** Ruby\
**Created:** [March 25, 2011, 2:06pm UTC](https://www.ruby-forum.com/t/do-i-need-to-upgrade-to-the-latest-version-of-ruby/204950 "2011-03-25T14:06:32Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 25, 2011, 2:06pm UTC](https://www.ruby-forum.com/t/do-i-need-to-upgrade-to-the-latest-version-of-ruby/204950/1 "2011-03-25T14:06:32Z")

</div>

Hi,

I have been using the Ruby version that came with Mac OSX (1.8.?) and  
so far no problems but I was wondering if it would be better to install  
the latest version of Ruby.

1- Does it make sense to upgrade to the latest version of Ruby?

2- Is there a big difference between 1.8 and 1.9?

3- Will code written in 1.8 works in 1.9?

4- Can someone show me how to install the newsiest version?

5- Do I need to uninstall 1.8 first?

6- Why is that I cannot see the Ruby installation anywhere in my Mac,  
where is Ruby installed?

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![fs\_tigre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/edb3f5/32.png) [@fs\_tigre](https://www.ruby-forum.com/u/fs_tigre)\
**Post date:** [March 25, 2011, 3:01pm UTC](https://www.ruby-forum.com/t/do-i-need-to-upgrade-to-the-latest-version-of-ruby/204950/2 "2011-03-25T15:01:14Z")

</div>

Thank you for your reply

Excuse my ignorance but how RVM works?

---

<div class="post-metadata">

**Author:** ![fs\_tigre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/edb3f5/32.png) [@fs\_tigre](https://www.ruby-forum.com/u/fs_tigre)\
**Post date:** [March 25, 2011, 2:46pm UTC](https://www.ruby-forum.com/t/do-i-need-to-upgrade-to-the-latest-version-of-ruby/204950/3 "2011-03-25T14:46:24Z")

</div>

I think using rvm is the best way to experiment with various versions of  
ruby:

[http://rvm.beginrescueend.com/](http://rvm.beginrescueend.com/)

---

<div class="post-metadata">

**Author:** ![fs\_tigre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/edb3f5/32.png) [@fs\_tigre](https://www.ruby-forum.com/u/fs_tigre)\
**Post date:** [March 25, 2011, 4:11pm UTC](https://www.ruby-forum.com/t/do-i-need-to-upgrade-to-the-latest-version-of-ruby/204950/4 "2011-03-25T16:11:40Z")

</div>

> 6- Why is that I cannot see the Ruby installation anywhere in my Mac,  
> where is Ruby installed?  
> open a terminal (found in utilities), type ‘which ruby’ at the  
> command prompt and it should say where ruby is  
> ‘ruby -v’ will display the version

If you’ve been using it, I assume via some editor/IDE, the properties/  
settings may have an entry displaying which ruby it is using

cheers

---

<div class="post-metadata">

**Author:** ![fs\_tigre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/edb3f5/32.png) [@fs\_tigre](https://www.ruby-forum.com/u/fs_tigre)\
**Post date:** [March 25, 2011, 3:17pm UTC](https://www.ruby-forum.com/t/do-i-need-to-upgrade-to-the-latest-version-of-ruby/204950/5 "2011-03-25T15:17:09Z")

</div>

On Fri, Mar 25, 2011 at 2:06 PM, Fily S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I have been using the Ruby version that came with Mac OSX (1.8.?) and  
> so far no problems but I was wondering if it would be better to install  
> the latest version of Ruby.
> 
> 1- Does it make sense to upgrade to the latest version of Ruby?

Yes.

> 2- Is there a big difference between 1.8 and 1.9?

Yes, especially under the hood. But language changes aren’t so  
dramatic IMHO. Typically stdlib functionality was extended so old  
code should run OK most of the time.

> 3- Will code written in 1.8 works in 1.9?

Actually much code will work unchanged but you need to test this of  
course.

> 4- Can someone show me how to install the newsiest version?

I typically do

$ ./configure --prefix=/usr/local --program-suffix=19  
$ make  
$ make install

Then I can start ruby19 and irb19, ri19 and it won’t interfere with  
old versions.

Not sure how you would go about this on a Mac though.

> 5- Do I need to uninstall 1.8 first?

No.

> 6- Why is that I cannot see the Ruby installation anywhere in my Mac,  
> where is Ruby installed?

Sorry, no Mac knowledge here.

Cheers

robert

---

<div class="post-metadata">

**Author:** ![fs\_tigre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/edb3f5/32.png) [@fs\_tigre](https://www.ruby-forum.com/u/fs_tigre)\
**Post date:** [March 25, 2011, 7:22pm UTC](https://www.ruby-forum.com/t/do-i-need-to-upgrade-to-the-latest-version-of-ruby/204950/6 "2011-03-25T19:22:54Z")

</div>

On Fri, Mar 25, 2011 at 10:06:35PM +0900, Fily S. wrote:

> 1- Does it make sense to upgrade to the latest version of Ruby?

I’d say it makes a lot of sense to have Ruby 1.9.x installed locally so  
you can run more programs than if you (only) have 1.8.x, but when  
writing  
code that might be shared with others it makes sense to avoid using  
1.9.x-only capabilities when they don’t give you much so you can  
maximize  
portability for others who might not yet have Ruby 1.9.x available.

> 2- Is there a big difference between 1.8 and 1.9?

Others have answered this reasonably well, I think.

> 3- Will code written in 1.8 works in 1.9?

Almost always.

> 4- Can someone show me how to install the newsiest version?

Others have answered this reasonably well, I think.

> 5- Do I need to uninstall 1.8 first?

Others have answered this reasonably well, I think.

> 6- Why is that I cannot see the Ruby installation anywhere in my Mac,  
> where is Ruby installed?

Whether others have answered this reasonably well or not, I have no  
idea.  
I have yet to use Ruby on a Mac.

---

<div class="post-metadata">

**Author:** ![fs\_tigre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/edb3f5/32.png) [@fs\_tigre](https://www.ruby-forum.com/u/fs_tigre)\
**Post date:** [March 25, 2011, 4:19pm UTC](https://www.ruby-forum.com/t/do-i-need-to-upgrade-to-the-latest-version-of-ruby/204950/7 "2011-03-25T16:19:54Z")

</div>

Thank you all for your help!

---

<div class="post-metadata">

**Author:** ![fs\_tigre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/edb3f5/32.png) [@fs\_tigre](https://www.ruby-forum.com/u/fs_tigre)\
**Post date:** [March 25, 2011, 8:09pm UTC](https://www.ruby-forum.com/t/do-i-need-to-upgrade-to-the-latest-version-of-ruby/204950/8 "2011-03-25T20:09:51Z")

</div>

use rvm and leave the system ruby alone. rvm is essentially a sandbox  
for installing and running different rubies with the added bonus of  
gemsets. The other option is to use mac ports to install the various  
ruby implementations and run

port -v install ruby19

The only benefit to using your package manager to install them is to  
have them available system wide and to automate dependencies and  
updates which rvm leaves the user to deal with by hand.

Of course you can do it both ways. But one thing I know for sure. You  
never want to remove system installed programs. Usually because some  
system installed bit may depend on it. Even in this case where ruby  
and rails are installed by apple for marketing to developers and  
create appeal for their product amongst web developers.Though I’m sure  
we all know that removing rails wont cause OSX to come tumbling down  
keeping the original ruby may save you on less headache or reinstall  
one day. Though I highly doubt removing the system ruby would really  
do any real harm. Just saying.

~

---

<div class="post-metadata">

**Author:** ![fs\_tigre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/edb3f5/32.png) [@fs\_tigre](https://www.ruby-forum.com/u/fs_tigre)\
**Post date:** [March 26, 2011, 1:04pm UTC](https://www.ruby-forum.com/t/do-i-need-to-upgrade-to-the-latest-version-of-ruby/204950/9 "2011-03-26T13:04:13Z")

</div>

On Fri, Mar 25, 2011 at 8:06 AM, Fily S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I have been using the Ruby version that came with Mac OSX (1.8.?) and  
> so far no problems but I was wondering if it would be better to install  
> the latest version of Ruby.

You might like to get an account at [ruby-versions.net](http://ruby-versions.net), which will give  
you  
an account you can ssh into and play with different versions of Ruby all  
the  
way back to 1.0

[http://www.ruby-forum.com/topic/212951](http://www.ruby-forum.com/topic/212951)

I don’t find that I use it often, but it’s a nice way to play around  
with  
the language, without needing to know how to set all that stuff up  
yourself.

> 4- Can someone show me how to install the newsiest version?

Personally, I am pretty happy with RVM

> **[Beginrescueend Forum](https://beginrescueend.com/)**

> 5- Do I need to uninstall 1.8 first?

Don’t do this, you could break anything that depends on it being there.

> 6- Why is that I cannot see the Ruby installation anywhere in my Mac,  
> where is Ruby installed?

At your terminal type: whereis ruby

This will look in some common locations that binaries are installed to,  
it  
will return your system Ruby. On mine (Snow Leopard) it says  
/usr/bin/ruby

Also useful is: which ruby

This returns the first match it finds at the directories specified in  
your  
$PATH variable (you can see what this looks like by doing: echo  
“$PATH”),  
which defines locations to look for binaries when you execute them in  
the  
terminal.

On Fri, Mar 25, 2011 at 9:14 AM, Robert K.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> old versions.
> 
> Not sure how you would go about this on a Mac though.

You could just put this into a local dir like ~/bin (and make an alias,  
or  
not use a suffix) then make sure it’s earlier in your $PATH so you get  
to  
use your Ruby, but other programs that depend on the system Ruby aren’t  
altered. This is how I dealt with it at school, where I couldn’t save  
outside my home directory, and it’s basically what RVM is doing when you  
install it locally, anyway.

---

<div class="post-metadata">

**Author:** ![fs\_tigre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/edb3f5/32.png) [@fs\_tigre](https://www.ruby-forum.com/u/fs_tigre)\
**Post date:** [March 27, 2011, 1:03am UTC](https://www.ruby-forum.com/t/do-i-need-to-upgrade-to-the-latest-version-of-ruby/204950/10 "2011-03-27T01:03:35Z")

</div>

Thank you all very much!

---

<div class="post-metadata">

**Author:** ![fs\_tigre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/edb3f5/32.png) [@fs\_tigre](https://www.ruby-forum.com/u/fs_tigre)\
**Post date:** [March 25, 2011, 9:31pm UTC](https://www.ruby-forum.com/t/do-i-need-to-upgrade-to-the-latest-version-of-ruby/204950/11 "2011-03-25T21:31:54Z")

</div>

Thanks a lot
