From: Ammar Ali Date: 2010-11-11T15:12:40+09:00 Subject: Re: [quite ot] scripting an rvm command On Thu, Nov 11, 2010 at 7:48 AM, botp wrote: > Hi All, > > sorry for this dumb question, but i'm getting zero iq as of this moment :) > > i cannot seem to run properly an rvm command inside a script file. my > objective is to run a ruby script on all rvm versions installed. > > eg, the ff runs fine when run thru the cli, > >   for i in `rvm list strings`; do rvm use "$i"; ruby -v;  done > > but when the above code is placed inside a script file, and then the > script is run,  you wont get the expected output. You just the same > ruby -v result on all rvm ruby versions, as if rvm use command was > ignored.. I just noticed your update, so I deleted more than half my response. But I wanted to mention that in addition to the ways outlined on that page, I find that wrapping version changes inside a bash function works well and is quite handy. Here's one example from a recent project: https://gist.github.com/672097 Then in the console, running ./multispec.sh does the job nicely. Regards, Ammar