Recommend
If you like my work with RVM, please recommend me *with a comment as to why you recommend me* on
Working With Rails – Thank You!
IRC
I am 'wayneeseguin' in #rvm on irc.freenode.net
If I do not respond right away, leave a message and I'll respond or leave you a memo when I am around.
Sponsors
$ rvm help # Documentation Index

The do set operation

Like most of the rvm set operations, do lets your perform commands against all installed rubies. Unlike the others, there is a key distinction - do lets you run any command (versus just ruby / gem and the like) and if it is only run against a single ruby, it performs the equivelent of do (e.g. no error message) after setting up the environment. As an example,

$ rvm do bash -c 'echo $GEM_HOME'

Will iterate over each ruby, calling bash with the given arguments. e.g, showing:

info: default (ree-1.8.7-2010.02): ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-darwin10.4.0], MBARI 0x6770, Ruby Enterprise Edition 2010.02

/Users/sutto/.rvm/gems/ree-1.8.7-2010.02

info: jruby-1.5.1: jruby 1.5.1 (ruby 1.8.7 patchlevel 249) (2010-06-06 f3a3480) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_20) [x86_64-java]

/Users/sutto/.rvm/gems/jruby-1.5.1

info: rbx-1.0.1-20100603: rubinius 1.0.1 (1.8.7 release 2010-06-03 JI) [x86_64-apple-darwin10.3.0]

/Users/sutto/.rvm/gems/rbx-1.0.1-20100603

info: ree-1.8.7-20090928: ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.3.0], MBARI 0x6770, Ruby Enterprise Edition 20090928

/Users/sutto/.rvm/gems/ree-1.8.7-20090928

info: ree-1.8.7-2010.02: ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-darwin10.4.0], MBARI 0x6770, Ruby Enterprise Edition 2010.02

/Users/sutto/.rvm/gems/ree-1.8.7-2010.02

info: ruby-1.8.7-head: ruby 1.8.7 (2010-07-17 patchlevel 300) [i686-darwin10.4.0]

/Users/sutto/.rvm/gems/ruby-1.8.7-headdo

info: ruby-1.9.2-head: ruby 1.9.2dev (2010-07-01 revision 28513) [x86_64-darwin10.3.0]

/Users/sutto/.rvm/gems/ruby-1.9.2-head

info: ruby-1.9.2-preview3: ruby 1.9.2dev (2010-05-31 revision 28117) [x86_64-darwin10.3.0]

/Users/sutto/.rvm/gems/ruby-1.9.2-preview3

Alternatively, calling against a single ruby will perform as such:

$ rvm ree do bash -c 'echo $GEM_HOME'

Shows the following, minus the info statements as above:

/Users/sutto/.rvm/gems/ree-1.8.7-2010.02
RVM Documentation Index