SlideShare a Scribd company logo
RVM
                        Cut Rubies With Ease




Sunday, March 6, 2011
Ruby Version Manager

                    • Multiple Ruby versions (compiled) and
                        installed in parallel
                    • Each Ruby version has its own
                        environment, lives in different directories
                    • Shell scripts to manage PATH, GEM_PATH,
                        GEM_HOME and much more



Sunday, March 6, 2011
Why?



Sunday, March 6, 2011
Ecosystem
                    • MRI (1.8)
                    • YARV (1.9)
                    • REE
                    • Rubinius
                    • JRuby
                    • MacRuby
                    • IronRuby, MagLev, HotRuby (!)
Sunday, March 6, 2011
MRI (1.8)
                    • Gold Ruby Standard
                    • Reference implementation (written in C)
                    • Good enough for most applications
                    • Slow: no bytecode, no JIT
                    • No built-in encoding support - only Iconv
                    • GC sucks
Sunday, March 6, 2011
REE (1.8)

                    • From Passenger (Apache/Nginx module for
                        Rails apps) devs - phusion.nl
                    • COW friendly
                    • Google’s tcmalloc
                    • Union Station - released yesterday

Sunday, March 6, 2011
YARV (1.9)
                    • Current stable, built upon 1.8 C codebase
                    • Everything works out of the box
                        unless depends_on?(Unmantained::Stuff)

                    • Faster than 1.8: bytecode, JIT (no rt.jar :)
                    • Strong encoding support
                    • GC (still) sucks
Sunday, March 6, 2011
Rubinius
                    • Ruby deserves to become first-class citizen
                    • Most of the stdlib written in Ruby
                    • Written in C++, bytecode, JIT
                    • Built on LLVM, spinned off RubySpec
                    • FFI subsystem for existing C extensions
                    • http://rubini.us/2011/02/25/why-use-rubinius/
Sunday, March 6, 2011
JRuby
                    • Ruby built on the JVM - from 1.5 onwards
                    • Fully interoperable
                     • Works {on,with} Java {servers, libraries}
                     • Call Java from Ruby and Ruby from Java
                    • FFI subsystem for existing C extensions
                    • Fast performance (JIT), Slow startup time
Sunday, March 6, 2011
MacRuby

                    • Sponsored by Apple, works only on OS X
                    • Built upon Objective-C runtime and LLVM
                    • A Ruby wrapper around CoreFoundation
                    • JITted, compiles to binary code
                    • Real GUIs can be built with it

Sunday, March 6, 2011
Others
                    • IronRuby is Ruby on .NET
                    • MagLev is distributed object persistence
                        amongst networked Ruby processes
                    • HotRuby is Ruby in the browser via
                        Javascript and Flash (!)

                    • RVM is the easiest way to try them all!

Sunday, March 6, 2011
Install RVM
                    • Run bash < <(curl http://
                      rvm.beginrescueend.com/
                        releases/rvm-install-head )

                    • Add [[  -s ~/.rvm/scripts/rvm ]]
                        && source ~/.rvm/scripts/rvm to
                        ~/.bashrc
                    • Set!

Sunday, March 6, 2011
RTFM


                        http://rvm.beginrescueend.com/




Sunday, March 6, 2011
Install something

                    •   rvm install 1.8 # the last 1.8 release

                    •   rvm install 1.9 # as above, for 1.9

                    •   rvm install rbx # Rubinius

                    •   rvm install ree

                    •   rvm install jruby




Sunday, March 6, 2011
What have we got?
                        $ rvm list
                        rvm rubies
                           macruby-0.6 [ x86_64 ]
                           rbx-1.2.2-20110222 [ ]
                           ree-1.8.7-2010.01 [ ]
                           ruby-1.8.7-p330 [ ]
                           ruby-1.9.2-p0 [ ]



Sunday, March 6, 2011
System ruby
                        $ rvm system
                        $ type ruby
                        ruby is /usr/bin/ruby
                        $ ruby -v
                        ruby 1.8.7 (2009-06-12
                        patchlevel 174) [universal-
                        darwin10.0]




Sunday, March 6, 2011
Let’s switch!
                        # Caveat - exact ruby version
                        $ rvm 1.9.2p0
                        $ type ruby
                        ruby is /Users/vjt/.rvm/rubies/
                        ruby-1.9.2-p0/bin/ruby
                        $ ruby -v
                        ruby 1.9.2p0 (2010-08-18
                        revision 29036) [x86_64-
                        darwin10.4.0]



Sunday, March 6, 2011
Again
                        $ rvm rbx-1.2.2
                        $ type ruby
                        ruby is /Users/vjt/.rvm/rubies/
                        rbx-1.2.2-20110222/bin/ruby
                        $ ruby -v
                        rubinius 1.2.2 (1.8.7 release
                        2011-02-22 JI) [x86_64-apple-
                        darwin10.5.0]



Sunday, March 6, 2011
What am I using?
                        $ rvm list

                        rvm rubies
                           macruby-0.6 [ x86_64 ]
                        => rbx-1.2.2-20110222 [ ]
                           ree-1.8.7-2010.01 [ ]
                           ruby-1.8.7-p330 [ ]
                           ruby-1.9.2-p0 [ ]




Sunday, March 6, 2011
Upgrade?
                        # Ruby
                        $ rvm upgrade 1.9.2-p0 1.9.2-
                        p180


                        # RVM itself
                        $ rvm get head




Sunday, March 6, 2011
Gemsets
                        $ rvm 1.9@someapp
                        $ gem list
                        *** LOCAL GEMS ***
                        abstract (1.0.0)
                        actionmailer (3.0.3)
                        actionpack (3.0.3)
                        activemodel (3.0.3)
                        activerecord (3.0.3)
                        ......


Sunday, March 6, 2011
Gemsets, continued
                        $ rvm 1.9@antani
                        $ gem list
                        *** LOCAL GEMS ***
                        rake (0.8.7)
                        $

                        Work in isolation on different apps with
                        different dependencies.


Sunday, March 6, 2011
Development
                • Put .rvmrc in the root of your project
                • Add it to the ignore list of your SCM
                • RVM will execute it when you enter the root
                        $ cat .rvmrc
                        rvm 1.8.7@ifad-members
                        [ -z "$SYBASE" -a -x /opt/sybase/SYBASE.sh ] &&
                        {
                          echo "loading sybase environment..."
                          . /opt/sybase/SYBASE.sh
                        }



Sunday, March 6, 2011
Production?
                        .bashrc:
                        source ~/.rvm/scripts/rvm

                        runner:
                        exec sudo -i -H -u someuser bash
                        -c 'echo; cd; exec unicorn
                         -c config/unicorn.conf.rb
                         -E production -D'




Sunday, March 6, 2011
Production - more
                    • Keep applications isolated from each
                        others
                    • Run applications requiring different
                        interpreters along each other
                    • Compile ruby with -static and run
                        everything in a chroot() [coming soon]
                    • Different users? Just use symlinks
Sunday, March 6, 2011
Thank you

                        http://sindro.me/
                        http://twitter.com/vjt


                        vjt@openssl.it



Sunday, March 6, 2011
Ad

More Related Content

What's hot (20)

Gems on Ruby
Gems on RubyGems on Ruby
Gems on Ruby
Hiroshi SHIBATA
 
The Future of Dependency Management for Ruby
The Future of Dependency Management for RubyThe Future of Dependency Management for Ruby
The Future of Dependency Management for Ruby
Hiroshi SHIBATA
 
How to develop the Standard Libraries of Ruby?
How to develop the Standard Libraries of Ruby?How to develop the Standard Libraries of Ruby?
How to develop the Standard Libraries of Ruby?
Hiroshi SHIBATA
 
ZK_Arch_notes_20081121
ZK_Arch_notes_20081121ZK_Arch_notes_20081121
ZK_Arch_notes_20081121
WANGCHOU LU
 
What's new in RubyGems3
What's new in RubyGems3What's new in RubyGems3
What's new in RubyGems3
Hiroshi SHIBATA
 
Gems on Ruby
Gems on RubyGems on Ruby
Gems on Ruby
Hiroshi SHIBATA
 
tDiary annual report 2009 - Sapporo Ruby Kaigi02
tDiary annual report 2009 - Sapporo Ruby Kaigi02tDiary annual report 2009 - Sapporo Ruby Kaigi02
tDiary annual report 2009 - Sapporo Ruby Kaigi02
Hiroshi SHIBATA
 
The Future of Bundled Bundler
The Future of Bundled BundlerThe Future of Bundled Bundler
The Future of Bundled Bundler
Hiroshi SHIBATA
 
Ruby Security the Hard Way
Ruby Security the Hard WayRuby Security the Hard Way
Ruby Security the Hard Way
Hiroshi SHIBATA
 
Invokedynamic in 45 Minutes
Invokedynamic in 45 MinutesInvokedynamic in 45 Minutes
Invokedynamic in 45 Minutes
Charles Nutter
 
Introduction to JRuby
Introduction to JRubyIntroduction to JRuby
Introduction to JRuby
ajuckel
 
Introduction to JRuby
Introduction to JRubyIntroduction to JRuby
Introduction to JRuby
Amit Solanki
 
20140918 ruby kaigi2014
20140918 ruby kaigi201420140918 ruby kaigi2014
20140918 ruby kaigi2014
Hiroshi SHIBATA
 
20140425 ruby conftaiwan2014
20140425 ruby conftaiwan201420140425 ruby conftaiwan2014
20140425 ruby conftaiwan2014
Hiroshi SHIBATA
 
Adventures of java developer in ruby world
Adventures of java developer in ruby worldAdventures of java developer in ruby world
Adventures of java developer in ruby world
Orest Ivasiv
 
20140419 oedo rubykaigi04
20140419 oedo rubykaigi0420140419 oedo rubykaigi04
20140419 oedo rubykaigi04
Hiroshi SHIBATA
 
OSS Security the hard way
OSS Security the hard wayOSS Security the hard way
OSS Security the hard way
Hiroshi SHIBATA
 
Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0
Hiroshi SHIBATA
 
近未来的並列 LL
近未来的並列 LL近未来的並列 LL
近未来的並列 LL
Motohiro Takayama
 
#dd12 IBM Lotus Traveler High Availability in a nutshell
#dd12 IBM Lotus Traveler High Availability in a nutshell#dd12 IBM Lotus Traveler High Availability in a nutshell
#dd12 IBM Lotus Traveler High Availability in a nutshell
Dominopoint - Italian Lotus User Group
 
The Future of Dependency Management for Ruby
The Future of Dependency Management for RubyThe Future of Dependency Management for Ruby
The Future of Dependency Management for Ruby
Hiroshi SHIBATA
 
How to develop the Standard Libraries of Ruby?
How to develop the Standard Libraries of Ruby?How to develop the Standard Libraries of Ruby?
How to develop the Standard Libraries of Ruby?
Hiroshi SHIBATA
 
ZK_Arch_notes_20081121
ZK_Arch_notes_20081121ZK_Arch_notes_20081121
ZK_Arch_notes_20081121
WANGCHOU LU
 
tDiary annual report 2009 - Sapporo Ruby Kaigi02
tDiary annual report 2009 - Sapporo Ruby Kaigi02tDiary annual report 2009 - Sapporo Ruby Kaigi02
tDiary annual report 2009 - Sapporo Ruby Kaigi02
Hiroshi SHIBATA
 
The Future of Bundled Bundler
The Future of Bundled BundlerThe Future of Bundled Bundler
The Future of Bundled Bundler
Hiroshi SHIBATA
 
Ruby Security the Hard Way
Ruby Security the Hard WayRuby Security the Hard Way
Ruby Security the Hard Way
Hiroshi SHIBATA
 
Invokedynamic in 45 Minutes
Invokedynamic in 45 MinutesInvokedynamic in 45 Minutes
Invokedynamic in 45 Minutes
Charles Nutter
 
Introduction to JRuby
Introduction to JRubyIntroduction to JRuby
Introduction to JRuby
ajuckel
 
Introduction to JRuby
Introduction to JRubyIntroduction to JRuby
Introduction to JRuby
Amit Solanki
 
20140425 ruby conftaiwan2014
20140425 ruby conftaiwan201420140425 ruby conftaiwan2014
20140425 ruby conftaiwan2014
Hiroshi SHIBATA
 
Adventures of java developer in ruby world
Adventures of java developer in ruby worldAdventures of java developer in ruby world
Adventures of java developer in ruby world
Orest Ivasiv
 
20140419 oedo rubykaigi04
20140419 oedo rubykaigi0420140419 oedo rubykaigi04
20140419 oedo rubykaigi04
Hiroshi SHIBATA
 
OSS Security the hard way
OSS Security the hard wayOSS Security the hard way
OSS Security the hard way
Hiroshi SHIBATA
 
Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0
Hiroshi SHIBATA
 

Viewers also liked (6)

Panmind at Ruby Social Club Milano
Panmind at Ruby Social Club MilanoPanmind at Ruby Social Club Milano
Panmind at Ruby Social Club Milano
Panmind
 
Zarządzanie zamianami w relacyjnych bazach danych
Zarządzanie zamianami w relacyjnych bazach danychZarządzanie zamianami w relacyjnych bazach danych
Zarządzanie zamianami w relacyjnych bazach danych
MarcinStachniuk
 
Полный цикл разработки на Python + Django
Полный цикл разработки на Python + DjangoПолный цикл разработки на Python + Django
Полный цикл разработки на Python + Django
Azamat Tokhtaev
 
Liquibase - Zarządzanie zmianami w relacyjnych bazach danych
Liquibase - Zarządzanie zmianami w relacyjnych bazach danychLiquibase - Zarządzanie zmianami w relacyjnych bazach danych
Liquibase - Zarządzanie zmianami w relacyjnych bazach danych
MarcinStachniuk
 
Retrospekcja warsztat Agile3M
Retrospekcja warsztat Agile3MRetrospekcja warsztat Agile3M
Retrospekcja warsztat Agile3M
Wòjcech Makùrôt
 
Penetrationtestinglovesfreesoftware libreplaner2017-christianfernandez-hispag...
Penetrationtestinglovesfreesoftware libreplaner2017-christianfernandez-hispag...Penetrationtestinglovesfreesoftware libreplaner2017-christianfernandez-hispag...
Penetrationtestinglovesfreesoftware libreplaner2017-christianfernandez-hispag...
Chris Fernandez CEHv7, eCPPT, Linux Engineer
 
Panmind at Ruby Social Club Milano
Panmind at Ruby Social Club MilanoPanmind at Ruby Social Club Milano
Panmind at Ruby Social Club Milano
Panmind
 
Zarządzanie zamianami w relacyjnych bazach danych
Zarządzanie zamianami w relacyjnych bazach danychZarządzanie zamianami w relacyjnych bazach danych
Zarządzanie zamianami w relacyjnych bazach danych
MarcinStachniuk
 
Полный цикл разработки на Python + Django
Полный цикл разработки на Python + DjangoПолный цикл разработки на Python + Django
Полный цикл разработки на Python + Django
Azamat Tokhtaev
 
Liquibase - Zarządzanie zmianami w relacyjnych bazach danych
Liquibase - Zarządzanie zmianami w relacyjnych bazach danychLiquibase - Zarządzanie zmianami w relacyjnych bazach danych
Liquibase - Zarządzanie zmianami w relacyjnych bazach danych
MarcinStachniuk
 
Ad

Similar to RVM and Ruby Interpreters @ RSC Roma 03/2011 (20)

Developing Cocoa Applications with macRuby
Developing Cocoa Applications with macRubyDeveloping Cocoa Applications with macRuby
Developing Cocoa Applications with macRuby
Brendan Lim
 
Ruby on rails toolbox
Ruby on rails toolboxRuby on rails toolbox
Ruby on rails toolbox
Blazing Cloud
 
UCLUG TorqueBox - 03/08/2011
UCLUG TorqueBox - 03/08/2011UCLUG TorqueBox - 03/08/2011
UCLUG TorqueBox - 03/08/2011
tobiascrawley
 
Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0
Hiroshi SHIBATA
 
The story of language development
The story of language developmentThe story of language development
The story of language development
Hiroshi SHIBATA
 
Setup ruby
Setup rubySetup ruby
Setup ruby
jugyo kohno
 
Practical JRuby
Practical JRubyPractical JRuby
Practical JRuby
David Keener
 
Ruby On Rails Ecosystem
Ruby On Rails EcosystemRuby On Rails Ecosystem
Ruby On Rails Ecosystem
Andrew Chalkley
 
An introduction to Rails 3
An introduction to Rails 3An introduction to Rails 3
An introduction to Rails 3
Blazing Cloud
 
Exploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLExploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQL
Barry Jones
 
JRuby - The Best of Java and Ruby
JRuby - The Best of Java and RubyJRuby - The Best of Java and Ruby
JRuby - The Best of Java and Ruby
Evgeny Rahman
 
JRuby Hot Topics 2008-12-12
JRuby Hot Topics 2008-12-12JRuby Hot Topics 2008-12-12
JRuby Hot Topics 2008-12-12
Koichiro Ohba
 
An introduction to the ruby ecosystem
An introduction to the ruby ecosystemAn introduction to the ruby ecosystem
An introduction to the ruby ecosystem
Geison Goes
 
Red Dirt Ruby Conference
Red Dirt Ruby ConferenceRed Dirt Ruby Conference
Red Dirt Ruby Conference
John Woodell
 
The Future of library dependency management of Ruby
 The Future of library dependency management of Ruby The Future of library dependency management of Ruby
The Future of library dependency management of Ruby
Hiroshi SHIBATA
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
Henry S
 
Using Java from Ruby with JRuby IRB
Using Java from Ruby with JRuby IRBUsing Java from Ruby with JRuby IRB
Using Java from Ruby with JRuby IRB
Hiro Asari
 
Using rbenv in Production
Using rbenv in ProductionUsing rbenv in Production
Using rbenv in Production
Nic Benders
 
Ruby Throwdown Hosted by Engine Yard
Ruby Throwdown Hosted by Engine YardRuby Throwdown Hosted by Engine Yard
Ruby Throwdown Hosted by Engine Yard
Jacob Lehrbaum
 
Fate of Ruby 1.8
Fate of Ruby 1.8Fate of Ruby 1.8
Fate of Ruby 1.8
shyouhei
 
Developing Cocoa Applications with macRuby
Developing Cocoa Applications with macRubyDeveloping Cocoa Applications with macRuby
Developing Cocoa Applications with macRuby
Brendan Lim
 
Ruby on rails toolbox
Ruby on rails toolboxRuby on rails toolbox
Ruby on rails toolbox
Blazing Cloud
 
UCLUG TorqueBox - 03/08/2011
UCLUG TorqueBox - 03/08/2011UCLUG TorqueBox - 03/08/2011
UCLUG TorqueBox - 03/08/2011
tobiascrawley
 
Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0
Hiroshi SHIBATA
 
The story of language development
The story of language developmentThe story of language development
The story of language development
Hiroshi SHIBATA
 
An introduction to Rails 3
An introduction to Rails 3An introduction to Rails 3
An introduction to Rails 3
Blazing Cloud
 
Exploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLExploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQL
Barry Jones
 
JRuby - The Best of Java and Ruby
JRuby - The Best of Java and RubyJRuby - The Best of Java and Ruby
JRuby - The Best of Java and Ruby
Evgeny Rahman
 
JRuby Hot Topics 2008-12-12
JRuby Hot Topics 2008-12-12JRuby Hot Topics 2008-12-12
JRuby Hot Topics 2008-12-12
Koichiro Ohba
 
An introduction to the ruby ecosystem
An introduction to the ruby ecosystemAn introduction to the ruby ecosystem
An introduction to the ruby ecosystem
Geison Goes
 
Red Dirt Ruby Conference
Red Dirt Ruby ConferenceRed Dirt Ruby Conference
Red Dirt Ruby Conference
John Woodell
 
The Future of library dependency management of Ruby
 The Future of library dependency management of Ruby The Future of library dependency management of Ruby
The Future of library dependency management of Ruby
Hiroshi SHIBATA
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
Henry S
 
Using Java from Ruby with JRuby IRB
Using Java from Ruby with JRuby IRBUsing Java from Ruby with JRuby IRB
Using Java from Ruby with JRuby IRB
Hiro Asari
 
Using rbenv in Production
Using rbenv in ProductionUsing rbenv in Production
Using rbenv in Production
Nic Benders
 
Ruby Throwdown Hosted by Engine Yard
Ruby Throwdown Hosted by Engine YardRuby Throwdown Hosted by Engine Yard
Ruby Throwdown Hosted by Engine Yard
Jacob Lehrbaum
 
Fate of Ruby 1.8
Fate of Ruby 1.8Fate of Ruby 1.8
Fate of Ruby 1.8
shyouhei
 
Ad

Recently uploaded (20)

Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 

RVM and Ruby Interpreters @ RSC Roma 03/2011

  • 1. RVM Cut Rubies With Ease Sunday, March 6, 2011
  • 2. Ruby Version Manager • Multiple Ruby versions (compiled) and installed in parallel • Each Ruby version has its own environment, lives in different directories • Shell scripts to manage PATH, GEM_PATH, GEM_HOME and much more Sunday, March 6, 2011
  • 4. Ecosystem • MRI (1.8) • YARV (1.9) • REE • Rubinius • JRuby • MacRuby • IronRuby, MagLev, HotRuby (!) Sunday, March 6, 2011
  • 5. MRI (1.8) • Gold Ruby Standard • Reference implementation (written in C) • Good enough for most applications • Slow: no bytecode, no JIT • No built-in encoding support - only Iconv • GC sucks Sunday, March 6, 2011
  • 6. REE (1.8) • From Passenger (Apache/Nginx module for Rails apps) devs - phusion.nl • COW friendly • Google’s tcmalloc • Union Station - released yesterday Sunday, March 6, 2011
  • 7. YARV (1.9) • Current stable, built upon 1.8 C codebase • Everything works out of the box unless depends_on?(Unmantained::Stuff) • Faster than 1.8: bytecode, JIT (no rt.jar :) • Strong encoding support • GC (still) sucks Sunday, March 6, 2011
  • 8. Rubinius • Ruby deserves to become first-class citizen • Most of the stdlib written in Ruby • Written in C++, bytecode, JIT • Built on LLVM, spinned off RubySpec • FFI subsystem for existing C extensions • http://rubini.us/2011/02/25/why-use-rubinius/ Sunday, March 6, 2011
  • 9. JRuby • Ruby built on the JVM - from 1.5 onwards • Fully interoperable • Works {on,with} Java {servers, libraries} • Call Java from Ruby and Ruby from Java • FFI subsystem for existing C extensions • Fast performance (JIT), Slow startup time Sunday, March 6, 2011
  • 10. MacRuby • Sponsored by Apple, works only on OS X • Built upon Objective-C runtime and LLVM • A Ruby wrapper around CoreFoundation • JITted, compiles to binary code • Real GUIs can be built with it Sunday, March 6, 2011
  • 11. Others • IronRuby is Ruby on .NET • MagLev is distributed object persistence amongst networked Ruby processes • HotRuby is Ruby in the browser via Javascript and Flash (!) • RVM is the easiest way to try them all! Sunday, March 6, 2011
  • 12. Install RVM • Run bash < <(curl http:// rvm.beginrescueend.com/ releases/rvm-install-head ) • Add [[ -s ~/.rvm/scripts/rvm ]] && source ~/.rvm/scripts/rvm to ~/.bashrc • Set! Sunday, March 6, 2011
  • 13. RTFM http://rvm.beginrescueend.com/ Sunday, March 6, 2011
  • 14. Install something • rvm install 1.8 # the last 1.8 release • rvm install 1.9 # as above, for 1.9 • rvm install rbx # Rubinius • rvm install ree • rvm install jruby Sunday, March 6, 2011
  • 15. What have we got? $ rvm list rvm rubies macruby-0.6 [ x86_64 ] rbx-1.2.2-20110222 [ ] ree-1.8.7-2010.01 [ ] ruby-1.8.7-p330 [ ] ruby-1.9.2-p0 [ ] Sunday, March 6, 2011
  • 16. System ruby $ rvm system $ type ruby ruby is /usr/bin/ruby $ ruby -v ruby 1.8.7 (2009-06-12 patchlevel 174) [universal- darwin10.0] Sunday, March 6, 2011
  • 17. Let’s switch! # Caveat - exact ruby version $ rvm 1.9.2p0 $ type ruby ruby is /Users/vjt/.rvm/rubies/ ruby-1.9.2-p0/bin/ruby $ ruby -v ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64- darwin10.4.0] Sunday, March 6, 2011
  • 18. Again $ rvm rbx-1.2.2 $ type ruby ruby is /Users/vjt/.rvm/rubies/ rbx-1.2.2-20110222/bin/ruby $ ruby -v rubinius 1.2.2 (1.8.7 release 2011-02-22 JI) [x86_64-apple- darwin10.5.0] Sunday, March 6, 2011
  • 19. What am I using? $ rvm list rvm rubies macruby-0.6 [ x86_64 ] => rbx-1.2.2-20110222 [ ] ree-1.8.7-2010.01 [ ] ruby-1.8.7-p330 [ ] ruby-1.9.2-p0 [ ] Sunday, March 6, 2011
  • 20. Upgrade? # Ruby $ rvm upgrade 1.9.2-p0 1.9.2- p180 # RVM itself $ rvm get head Sunday, March 6, 2011
  • 21. Gemsets $ rvm 1.9@someapp $ gem list *** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.3) actionpack (3.0.3) activemodel (3.0.3) activerecord (3.0.3) ...... Sunday, March 6, 2011
  • 22. Gemsets, continued $ rvm 1.9@antani $ gem list *** LOCAL GEMS *** rake (0.8.7) $ Work in isolation on different apps with different dependencies. Sunday, March 6, 2011
  • 23. Development • Put .rvmrc in the root of your project • Add it to the ignore list of your SCM • RVM will execute it when you enter the root $ cat .rvmrc rvm 1.8.7@ifad-members [ -z "$SYBASE" -a -x /opt/sybase/SYBASE.sh ] && { echo "loading sybase environment..." . /opt/sybase/SYBASE.sh } Sunday, March 6, 2011
  • 24. Production? .bashrc: source ~/.rvm/scripts/rvm runner: exec sudo -i -H -u someuser bash -c 'echo; cd; exec unicorn -c config/unicorn.conf.rb -E production -D' Sunday, March 6, 2011
  • 25. Production - more • Keep applications isolated from each others • Run applications requiring different interpreters along each other • Compile ruby with -static and run everything in a chroot() [coming soon] • Different users? Just use symlinks Sunday, March 6, 2011
  • 26. Thank you http://sindro.me/ http://twitter.com/vjt [email protected] Sunday, March 6, 2011