Make path fix work with Rails 4