added rails_env to app and added default scope to load apps for the env its ran in