Not sure we need the `set_env` method - how about just doing `env['RAILS_ENV'] = 'staging'`?

After that I think this will be good to merge. Thanks.