Use with_rails_env instead of modifying ENV directly