Update railties dependency to > 3.1

Depending on `~> 3.1` prevents this gem from being used with Rails 4.