Fix release stage

Rails does not need to set `RAILS_ENV` to run. In some situations, only `RACK_ENV` exists but `Rails.env` handle both of the env and return proper env.
I think we should follow the return value of `Rails.env`