Update app.rb

Run in background