support Rails 4.0

Fixes a bug with Rails 4 in the routes (backwards compatible). Also adds a Rails 4 gemfile to build in Travis.