Update all of the gems so that Rails 4 works

- I've probably missed some, but there'll be further updates as I go
  through every error that now exists.