RVM
Ruby Version Manager

       Brian Turnbull
  NH Ruby — 16 November 2009
Cut Rubies With Ease




 http://rvm.beginrescueend.com
    #rvm on irc.freenode.net
Getting Started

‣ Install as a Gem
‣ Clone Git repository
‣ Source tarball




                         Flickr: “Egg with...
Make it Work
## End of ~/.bash_profile
if [[ -s $HOME/.rvm/scripts/rvm ]] ; then
   source $HOME/.rvm/scripts/rvm
fi

## /...
What Now?

Learn It   ➡   $ rvm list --all
 Live It   ➡   $ rvm install 1.8.7
Love It    ➡   $ rvm 1.8.7
What Just Happened?
$ rvm 1.8.7

$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) ...

$ which ruby
/Users/brian/.rvm/ruby...
Be Specific
$ rvm list
   ruby-1.8.6-p383: ruby 1.8.6 (2009-08-04 patchlevel 383) ...
   ruby-1.8.7-p173: ruby 1.8.7 (2009-...
Playing Favorites
$ rvm 1.8.7-p174 --default

$ rvm 1.8.6-p383

$ ruby -v
ruby 1.8.6 (2009-08-04 patchlevel 383) ...

$ rv...
Make It Shiny
$ rvm 1.8.7-p174

$ gem install net-ssh
Successfully installed net-ssh-2.0.15
1 gem installed

$ rvm 1.8.6-p...
1.8.7
Gems

           Gems


         1.8.6
1.8.7
Gems   gem
             sync
                      Gems


                    1.8.6
1.8.7
Gems dg
      uem
        mps
          /yoa
            l ncd
                    Gems


                1.8.6
Named Gem Sets
                              1.8.7
    Compartmentalize a    Default     Gem
‣   set of gems under a
    R...
Named Gem Sets
                                1.8.7



                              t
                            Se
   ...
Tricks
$ rvm 1.8.6,1.8.7,1.9.1 rake spec
... lotsa passing tests ...

$ rvm 1.8.6,1.8.7,1.9.1 --json rake spec
... lotsa p...
Demo!




                  Flickr: “Crash & Burn” by Handforged
    http://www.flickr.com/photos/handforged/292093553
RVM
Ruby Version Manager

       Brian Turnbull
  NH Ruby — 16 November 2009
Upcoming SlideShare
Loading in...5
×

RVM - NHRuby Nov 2009

1,060
-1

Published on

Overview of the Ruby Version Manager (http://rvm.beginrescueend.com) by Wayne Seguin.

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,060
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

RVM - NHRuby Nov 2009

  1. 1. RVM Ruby Version Manager Brian Turnbull NH Ruby — 16 November 2009
  2. 2. Cut Rubies With Ease http://rvm.beginrescueend.com #rvm on irc.freenode.net
  3. 3. Getting Started ‣ Install as a Gem ‣ Clone Git repository ‣ Source tarball Flickr: “Egg with directional shadow and background” by Tsja http://www.flickr.com/photos/10451396@N00/337315801
  4. 4. Make it Work ## End of ~/.bash_profile if [[ -s $HOME/.rvm/scripts/rvm ]] ; then source $HOME/.rvm/scripts/rvm fi ## /etc/rvmrc ## ~/.rvmrc export rvm_archflags="-arch x86_64" export rvm_make_flags="-j 3" export rvm_install_on_use_flag=1 Flickr: “Martillo / Hammer” by Kaworu Koneru http://www.flickr.com/photos/kaworukoneru/2230794481
  5. 5. What Now? Learn It ➡ $ rvm list --all Live It ➡ $ rvm install 1.8.7 Love It ➡ $ rvm 1.8.7
  6. 6. What Just Happened? $ rvm 1.8.7 $ ruby -v ruby 1.8.7 (2009-06-12 patchlevel 174) ... $ which ruby /Users/brian/.rvm/ruby-1.8.7-p174/bin/ruby $ rvm system $ which ruby /usr/bin/ruby
  7. 7. Be Specific $ rvm list ruby-1.8.6-p383: ruby 1.8.6 (2009-08-04 patchlevel 383) ... ruby-1.8.7-p173: ruby 1.8.7 (2009-06-08 patchlevel 173) ... => ruby-1.8.7-p174: ruby 1.8.7 (2009-06-12 patchlevel 174) ... => (default) ruby-1.8.7-p174: ruby 1.8.7 (2009-06-12 patchlevel 174) ... system: ruby 1.8.7 (2008-08-11 patchlevel 72) ... $ rvm 1.8.7-p173 $ ruby -v ruby 1.8.7 (2009-06-08 patchlevel 173) ... $ rvm 1.8.7 $ ruby -v ruby 1.8.7 (2009-06-12 patchlevel 174) ...
  8. 8. Playing Favorites $ rvm 1.8.7-p174 --default $ rvm 1.8.6-p383 $ ruby -v ruby 1.8.6 (2009-08-04 patchlevel 383) ... $ rvm default $ ruby -v ruby 1.8.7 (2009-06-12 patchlevel 174) ...
  9. 9. Make It Shiny $ rvm 1.8.7-p174 $ gem install net-ssh Successfully installed net-ssh-2.0.15 1 gem installed $ rvm 1.8.6-p383 $ irb ruby-1.8.6-p383 > require 'net/ssh' LoadError: no such file to load -- net/ssh
  10. 10. 1.8.7 Gems Gems 1.8.6
  11. 11. 1.8.7 Gems gem sync Gems 1.8.6
  12. 12. 1.8.7 Gems dg uem mps /yoa l ncd Gems 1.8.6
  13. 13. Named Gem Sets 1.8.7 Compartmentalize a Default Gem ‣ set of gems under a Ruby interpreter Gems Set Gem Set
  14. 14. Named Gem Sets 1.8.7 t Se Compartmentalize a Default Gem ‣ em set of gems under a Gems Set Ruby interpreter G Gem Set
  15. 15. Tricks $ rvm 1.8.6,1.8.7,1.9.1 rake spec ... lotsa passing tests ... $ rvm 1.8.6,1.8.7,1.9.1 --json rake spec ... lotsa passing tests ... ... and a nice JSON summary ... $ PS1="$PS1$(~/.rvm/bin/rvm-prompt) " $ rvm update [--head] $ bundle_dir = ENV["GEM_PATH"] || %x{source ~/.rvm/scripts/rvm && rvm gemdir}
  16. 16. Demo! Flickr: “Crash & Burn” by Handforged http://www.flickr.com/photos/handforged/292093553
  17. 17. RVM Ruby Version Manager Brian Turnbull NH Ruby — 16 November 2009

×