Add support for rails environment