Change way of checking rails env.
Merge pull request #1 from Kavrus/patch-1

Change way of checking rails env.