minor - set rails env in common and fix upstart