Upgrade Rails and use pessimistic versioning

As promised! There still are outdated dependencies, but at least Rails is updated now.

By the way, can we remove support for Ruby 1.8? Doesn't seem to be tested on Travis.