Ruby problem

Phil Dobbin phildobbin at gmail.com
Fri Mar 16 04:09:45 PDT 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 15/03/2012 23:11, Phillip Koebbe wrote:
> 
> On Mar 15, 2012, at 5:42 PM, Ryan Schmidt wrote:
> 
>>
>> On Mar 15, 2012, at 13:17, Phillip Koebbe wrote:
>>
>>> If I'm following along correctly (and I very well may not be), you're thinking that calling 'sudo port <something>' in one terminal session is causing problems with RVM in other terminal sessions. Is that correct?
>>
>> I understood that he's saying that calling "sudo port <something>" in a terminal session causes problems for rvm in that same terminal session.
>>
>>
> 
> Okay, I gave that a whirl too:
> 
> [kodiak]~/Development/Projects/Self/Web/Grounect/grounect (master) $ rvm current
> ruby-1.9.2-p290 at grounect-3.2.2
> [kodiak]~/Development/Projects/Self/Web/Grounect/grounect (master) $ sudo port selfupdate
> --->  Updating MacPorts base sources using rsync
> MacPorts base version 2.0.4 installed,
> MacPorts base version 2.0.4 downloaded.
> --->  Updating the ports tree
> --->  MacPorts base is already the latest version
> 
> The ports tree has been updated. To upgrade your installed ports, you should run
>   port upgrade outdated
> [kodiak]~/Development/Projects/Self/Web/Grounect/grounect (master) $ rvm current
> ruby-1.9.2-p290 at grounect-3.2.2
> [kodiak]~/Development/Projects/Self/Web/Grounect/grounect (master) $ 
> 
> Seems to work like I expect. Mac OS X 10.7.3, MacPorts 2.0.4, RVM 1.10.2.


Hi, Phillip.

What is occurring is on my OS X box I'm using rvm to handle Ruby which
it does fine. However an anomaly occurs whenever I call sudo port
selfupdate & upon the ports finishing their job instead of rvm being set
as Ruby control the Ruby I have installed in /opt/local/bin is now
active (see previous post for gist).

I have also a System supplied Ruby but that is never called. So I was
trying to establish the cause of the anomaly in order to correct it.

Several things have since transpired whilst I've been looking into this:

If I open a new terminal window that is apart from the project workspace
(for want of a better word) I use in iTerm2 (six tabs running different
jobs) & call sudo port selfupdate, all works as should be i.e. rvm in
all open windows/tabs is still in charge so to speak of the Ruby
version. So that's one workaround initially.

However, the other thing I discovered was that if I source my
bash_profile in any tab or window, the Ruby again switches to the
/opt/local/bin/ruby (opening a new window or tab reverts this behaviour
to what's actually written in bash_profile: i.e. rvm's Rubies).

At this point, having spent far too long on this, I'm just about to cut
my losses & uninstall the Ruby in /opt/local & just get on with things.
However, I'd like to make it perfectly clear that I'm not apportioning
any blame to either Mac Ports, rvm or anything else for that matter.
Contrarily, I'd like to thank everybody for their time, help & advice.

Cheers,

  Phil...

- -- 
But masters, remember that I am an ass.
Though it be not written down,
yet forget not that I am an ass.

	Wm. Shakespeare - Much Ado About Nothing


-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: §auto-key-locate cert pka ldap hkp://keys.gnupg.net
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPYx92AAoJEKpMeDHWT5ADEy0H/3GAWNjnnZ7tNr4zft1fNu3Y
NbG2eOdDbEaYQDdEm6ky+ANM8bnDIr2cM5VWCUpFL3xiqibwl1n5vxy051CVzko3
/Ss075p/usMDgRSZSDOUsHvifMumX5+E6Kj9IzSSL7x0R6hyqvgdZsAP6PSylY+N
rEMjkPS6BfPH8ujJNGqV+kaHmBJlirRqOm8jOJ8lQqUXAOerCRPUE8aZtKQVTL3+
ziMy9qDN06hCBY6eT0oo2L4hclkLeL9lOfd3gSy3XQws9CzqVVbU+7opoFDBvghs
ce02dTGuxrV6La0cb/lP1tN2EiUHon314FMnHZhUcZXqtkwxaWQMGUTa27wFQQI=
=glov
-----END PGP SIGNATURE-----


More information about the macports-users mailing list