Skip to content

Instantly share code, notes, and snippets.

@jonhinson
Created September 20, 2011 15:43
Show Gist options
  • Save jonhinson/1229453 to your computer and use it in GitHub Desktop.
Save jonhinson/1229453 to your computer and use it in GitHub Desktop.
When using resque in conjunction with PostgreSQL (I am deploying on Heroku's cedar stack), make sure you have this before_fork hook
task "resque:setup" => :environment do
Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment