Platinum Partner

Upgrade Rubygems And/or Specific Gems Themselves Via Capistrano

When a latest RubyGems is released (e.g. 0.9.5 recently) or Rails (e.g. 2.0.2) you might want to push those upgrades to all your production machines.

Add these two tasks to your deploy.rb capistrano file (add namespaces for cap2.0 if you like)


  desc "Updates RubyGems version"
  task :gem_update_system do
    sudo "gem update --system"
  end

    
  desc "Install a RubyGem from remote source"
  task :gem_install do
    puts "USAGE: GEM=gemname cap gems_install" and next unless ENV['GEM']
    sudo "gem install #{ENV['GEM']} --no-ri --no-rdoc"
  end


To upgrade rubygems and rails, for example:


cap gem_update_system
GEM=rails cap gem_install

{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}