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...
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"
...
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.gi...
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@...
• 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...
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/kei...
References

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




=   WIN!
RVM, Bundler and Ruby Tracker
RVM, Bundler and Ruby Tracker
RVM, Bundler and Ruby Tracker
RVM, Bundler and Ruby Tracker
RVM, Bundler and Ruby Tracker
RVM, Bundler and Ruby Tracker
RVM, Bundler and Ruby Tracker
RVM, Bundler and Ruby Tracker
Upcoming SlideShare
Loading in...5
×

RVM, Bundler and Ruby Tracker

2,491

Published on

Slides from lightning talk given at rorosyd on 10 August 2010

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

No Downloads
Views
Total Views
2,491
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
29
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide







































  • RVM, Bundler and Ruby Tracker

    1. 1. RVM, Bundler and Ruby Tracker @keithpitty @cockatoo_sw
    2. 2. Earlier this year I had a challenge...
    3. 3. Mismatch Rails 1.2.6 Ruby Ruby 1.8.7 1.8.6 Machine Needed
    4. 4. I had Ruby 1.8.7 in /usr/local
    5. 5. I had all gems installed via sudo
    6. 6. Installed RVM http://rvm.beginrescueend.com/rvm/install/ with help from Wayne Seguin via #rvm
    7. 7. Installed & used rubies rvm install 1.8.6 rvm 1.8.6
    8. 8. rvm list rvm info rvm help
    9. 9. More recently upgraded a Rails 2.3 app to run on Ruby 1.9
    10. 10. Used RVM with gemsets this time to keep gem versions discrete
    11. 11. And also...
    12. 12. Guide for setting up Bundler with Rails 2.3 at http://gembundler.com/rails23.html
    13. 13. specify gems in Gemfile
    14. 14. 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"
    15. 15. group :development do gem "rubyrep" end group :test do gem "rspec" gem "rspec-rails" end
    16. 16. group :production do gem "net-ldap" gem "activedirectory", :git => "git://github.com/keithpitty/activedirectory.git", :tag => "v1.0.3" end
    17. 17. bundle install bundle lock bundle package see Bundler doco for more
    18. 18. and now for a treat...
    19. 19. .rvmrc
    20. 20. Contents of .rvmrc ruby version gemset name rvm 1.9.1@foo
    21. 21. What’s so special about .rvmrc?
    22. 22. cd appname If the directory contains .rvmrc the RVM sandbox will be set!
    23. 23. RVM, Bundler & .rvmrc - What’s needed in a nutshell?
    24. 24. 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
    25. 25. • Note: RVM’s global gemset is useful for commonly used gems • See the RVM doco for more details
    26. 26. source "http://rubygems.org" gem 'sinatra' gem 'haml' gem 'RedCloth' gem 'pony' gem 'builder' gem 'toadhopper-sinatra'
    27. 27. And now, before I give you some references...
    28. 28. some shameless self-promotion...
    29. 29. www.cockatoosoftware.com.au @cockatoo_sw @keithpitty http://keithpitty.com/blog http://github.com/keithpitty
    30. 30. References • http://rvm.beginrescueend.com/ • http://gembundler.com/ • http://rubytracker.com/ • http://lindsaar.net/2010/3/31/ bundle_me_some_sanity
    31. 31. + + = WIN!
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×