Check if the rack_env is set

I have a rack app build with ruby, it does not make sens for me to add set the `rails_env`. The same applies for my other apps that are not build on top of rails. I propose checking for the `rack_env` first.