drop rails_env use thread current vars, this should be safer, and makes it sinatra etc compatible.