# How do I remove version 1.8.5 so that 1.8.6 will work on os

**URL:** <https://www.ruby-forum.com/t/how-do-i-remove-version-1-8-5-so-that-1-8-6-will-work-on-os/138915>\
**Category:** Ruby\
**Created:** [May 28, 2008, 11:16pm UTC](https://www.ruby-forum.com/t/how-do-i-remove-version-1-8-5-so-that-1-8-6-will-work-on-os/138915 "2008-05-28T23:16:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![robblovell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bc79bd/32.png) [@robblovell](https://www.ruby-forum.com/u/robblovell)\
**Post date:** [May 28, 2008, 11:16pm UTC](https://www.ruby-forum.com/t/how-do-i-remove-version-1-8-5-so-that-1-8-6-will-work-on-os/138915/1 "2008-05-28T23:16:03Z")

</div>

I have two ruby installs on os X after migrating from tiger to leopard.  
The old one, version 1.8.5 is active and doesn’t work, the new one,  
version 1.8.6 is installed, but not active. How do I correct the  
situation?

Details:

sudo port install ruby  
Password:  
—\> Fetching ruby  
—\> Verifying checksum(s) for ruby  
—\> Extracting ruby  
—\> Applying patches to ruby  
—\> Configuring ruby  
—\> Building ruby with target all  
—\> Staging ruby into destroot  
—\> Installing ruby 1.8.6-p111\_1+darwin\_9+thread\_hooks  
—\> Activating ruby 1.8.6-p111\_1+darwin\_9+thread\_hooks  
Error: Target org.macports.activate returned: Image error: Another  
version of this port (ruby @1.8.6-p111\_1+thread\_hooks) is already  
active.  
Error: Status 1 encountered during processing.

18 ~/Ruby/source -\>which ruby  
/sw/bin/ruby

19 ~/Ruby/source -\>ruby --version  
ruby 1.8.5 (2006-12-25 patchlevel 12) [i686-darwin]

20 ~/Ruby/source -\>whereis ruby  
/usr/bin/ruby

21 ~/Ruby/source -\>sudo port uninstall ruby  
Password:  
—\> The following versions of ruby are currently installed:  
—\> ruby @1.8.6-p111\_1+darwin\_9+thread\_hooks  
—\> ruby @1.8.6-p111\_1+thread\_hooks (active)  
Error: port uninstall failed: Registry error: Please specify the full  
version as recorded in the port registry.  
22 ~/Ruby/source -\>

A typical error from the non-working ruby:

ruby readgoogle.rb  
/sw/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem_original_require': no such file to load -- mechanize (LoadError) from /sw/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in`require’  
from readgoogle.rb:2

Where is ruby 1.8.6 installed in a standard leopard install?  
How is the install different than 1.8.5?  
How do I uninstall 1.8.5 and leave 1.8.6?

---

<div class="post-metadata">

**Author:** ![robblovell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bc79bd/32.png) [@robblovell](https://www.ruby-forum.com/u/robblovell)\
**Post date:** [May 29, 2008, 12:32am UTC](https://www.ruby-forum.com/t/how-do-i-remove-version-1-8-5-so-that-1-8-6-will-work-on-os/138915/2 "2008-05-29T00:32:58Z")

</div>

This link helped me sort things out:

[http://www.robbyonrails.com/articles/2008/01/22/installing-ruby-on-rails-and-postgresql-on-os-x-third-edition](http://www.robbyonrails.com/articles/2008/01/22/installing-ruby-on-rails-and-postgresql-on-os-x-third-edition)

I renamed all copies of ruby essentially disabling them and then used  
the instructions on the site to reinstall ruby.

---

<div class="post-metadata">

**Author:** ![robblovell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bc79bd/32.png) [@robblovell](https://www.ruby-forum.com/u/robblovell)\
**Post date:** [May 29, 2008, 1:27pm UTC](https://www.ruby-forum.com/t/how-do-i-remove-version-1-8-5-so-that-1-8-6-will-work-on-os/138915/3 "2008-05-29T13:27:37Z")

</div>

Robb Lovell wrote:

> I have two ruby installs on os X after migrating from tiger to leopard.  
> The old one, version 1.8.5 is active and doesn’t work, the new one,  
> version 1.8.6 is installed, but not active. How do I correct the  
> situation?

A common approach is to install in directories that reflect the version  
number, say ruby1.8.5 and ruby1.8.6, located wherever convenient, and  
then set /usr/bin/ruby to be a symbolic link to the required directory.  
Once the new version has been installed and tested, you change the link  
to point to the new directory rather than the old one. (If you  
subsequently have problems, it’s easy to revert!)
