i created a custom staging environment in my rails app by adding new file config/environments/staging.rb, same as config/environments/development
created
config/environments/staging.rb
config/environments/development
You can try this in your application.rb after Bundler.require statement
application.rb
Bundler.require
ENV['RAILS_ENV'] ||= 'staging'