Delayed_job (or DJ) encapsulates the common pattern of asynchronously executing longer tasks in the background. It is a direct extraction from Shopify where the job table is responsible for a multitude of core tasks. This gem is collectiveidea's fork (http://github.com/collectiveidea/delayed_job).
Gemfile gem 'delayed_job', '~> 2.0.7'
install gem install delayed_job -v 2.0.7