Skip to content

Instantly share code, notes, and snippets.

namespace :db do
task :pull do
run "cd #{current_release} && RAILS_ENV=#{rails_env} rake db:data:dump"
download "#{current_release}/db/data.yml", "db/data.yml"
`rake db:reset db:data:load`
end
end
@tbuser
tbuser / Basecamp-style dynamic subdomains
Created January 7, 2009 20:46 — forked from anonymous/gist:44410
Basecamp-style dynamic subdomains
# 1) Point *.example.com in your DNS setup to your server.
#
# 2) Setup an Apache vhost to catch the star pointer:
#
# <VirtualHost *:80>
# ServerName *.example.com
# </VirtualHost>
#
# 3) Set the current account from the subdomain
class ApplicationController < ActionController::Base