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

R

Robb Lovell

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?
 
D

Dave Bass

Robb said:
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!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top