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 <[email protected]> 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
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/fab-user
>
>


-- 
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org
_______________________________________________
Fab-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to