Because `rake db:pull` is awesome.
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app/metal
generators/tapsuey
lib
rails
recipes
tasks
README.rdoc
TODO.rdoc

README.rdoc

Tapsuey

Tapsuey is a Rails plugin that helps you copy production data down into your development environment.

All the heavy lifting is done by (my fork of) Heroku's excellent taps gem.

Install

script/plugin install git://github.com/matthewtodd/tapsuey.git

Configure

script/generate tapsuey
# edit config/initializers/tapsuey.rb

Deploy

cap deploy

Use

rake db:pull

Notes

Capistrano

A `cap tapsuey:db:pull` task is provided so you can sync your staging environment with production when you deploy. (A guard clause is included so that the task has no effect in production.)

You might hook it up like so:

after 'deploy:update_code', 'tapsuey:db:pull'

Paperclip

If you're using Paperclip and keeping files on the filesystem rather than S3, you'll also want to pull those down:

namespace :db do
  namespace :pull do
    desc 'Pull production files to the local filesystem.'
    task :files do
      system 'rsync -rP --delete myapp:shared/public/system/ public/system'
    end
  end

  task :pull => 'db:pull:files'
end