Not in code

Software is about people

Wrong Ruby version on your Powerbook?

If you own an Apple Powerbook and try upgrading Ruby using MacPorts, you may find that typing ‘ruby -v’ at the console stubbornly insists the version installed is 1.8.2 whereas you’re expecting something more recent (1.8.6 at time of this post).

In my case it turned out that this was because the default order of the PATH environment variable had ‘/opt/local/bin’ after ‘/usr/bin’. This meant that the older version that came with OS X Tiger which was in ‘/usr/bin’ was being used in preference to the newer version installed by MacPorts in ‘/opt/local/bin’.

The solution: simply change PATH in ~/.profile so ‘/opt/local/bin’ appears before ‘/usr/bin’.

Finally, it turns out that on my shiny new Macbook Pro the PATH is ordered this way by default.

Written by hiremaga

May 5, 2007 at 4:16 pm

Posted in Uncategorized

Tagged with ,