RVM, Bundler and
  Ruby Tracker
     @keithpitty

    @cockatoo_sw
Earlier this year I had a challenge...
Mismatch



                      Rails
                      1.2.6


 Ruby                 Ruby
 1.8.7                1.8.6


Machine              Needed
I had Ruby 1.8.7 in /usr/local
I had all gems installed via sudo
Installed RVM

http://rvm.beginrescueend.com/rvm/install/

  with help from Wayne Seguin via #rvm
Installed & used rubies

rvm install 1.8.6

rvm 1.8.6
rvm list
rvm info
rvm help
More recently

upgraded a Rails 2.3 app
  to run on Ruby 1.9
Used RVM with gemsets this time
 to keep gem versions discrete
And also...
Guide for setting up Bundler
          with Rails 2.3 at
http://gembundler.com/rails23.html
specify gems in Gemfile
source "http://rubygems.org"

gem "rails", "~> 2.3.8"
gem "bundler"

gem   "whenever", "0.4.0"
gem   "aasm"
gem   "mysql"
gem   "ar-extensions"
gem   "paperclip"
gem   "paper_trail"
group :development do
  gem "rubyrep"
end

group :test do
  gem "rspec"
  gem "rspec-rails"
end
group :production do
  gem "net-ldap"
  gem "activedirectory",
    :git => "git://github.com/keithpitty/activedirectory.git",
    :tag => "v1.0.3"
end
bundle install
     bundle lock
     bundle package


see Bundler doco for more
and now for a treat...
.rvmrc
Contents of .rvmrc
 ruby version   gemset name



  rvm 1.9.1@foo
What’s so special about .rvmrc?
cd appname

If the directory contains .rvmrc
  the RVM sandbox will be set!
RVM, Bundler & .rvmrc -
What’s needed in a nutshell?
rvm 1.9.1

rvm gemset create foo

rvm gemset use foo

gem install bundler (if necessary)

bundle install

echo “rvm 1.9.1@foo” > .rvmrc
• Note: RVM’s global gemset is useful for
  commonly used gems

• See the RVM doco for more details
source "http://rubygems.org"

gem   'sinatra'
gem   'haml'
gem   'RedCloth'
gem   'pony'
gem   'builder'
gem   'toadhopper-sinatra'
And now, before I give you some references...
some shameless self-promotion...
www.cockatoosoftware.com.au

      @cockatoo_sw

        @keithpitty

  http://keithpitty.com/blog

 http://github.com/keithpitty
References

• http://rvm.beginrescueend.com/
• http://gembundler.com/
• http://rubytracker.com/
• http://lindsaar.net/2010/3/31/
  bundle_me_some_sanity
+          +




=   WIN!

RVM, Bundler and Ruby Tracker