Fix Rails 4 detection
Merge pull request #3020 from adrpac/master

Fix Rails 4 detection