fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] rvm with local calls


From: Jeff Forcier
Subject: Re: [Fab-user] rvm with local calls
Date: Thu, 15 Nov 2012 11:01:53 -0800

IIRC .rvmrc files only get loaded by RVM's overloaded "cd", so you might want to try using e.g.::

    with lcd('mydir'):
        local('stuff using rvm driven rubies or gems')

Which turns into "cd mydir && command".

Unfortunately RVM is a bit "special" re: how it likes to be invoked / related to the shell / etc -- so the above might not suffice in a variety of ways. You might want to experiment with raw subprocess.Popen() instances until you get something that works, then we can help figure out how to make that work in local().

E.g. you may have to use the new shell= kwarg to local(), in case e.g. the default shell subprocess.Popen selects on your system is not your user's login shell and thus isn't even loading up RVM at all. But that's just a guess.

Best,
Jeff


On Wed, Nov 14, 2012 at 4:47 AM, S Ahmed <address@hidden> wrote:
I am making a call to a directory locally that has a .rvmrc file, but it doesn't get picked up and the call fails as it doesn't find the gem since it isn't available in that context.

Is it possible to load rvm somehow?  I'm guessing I will need a 'with' block?

_______________________________________________
Fab-user mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fab-user




--
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]