Bump up to Rails 4

We made an attempt at making it Rails 4 compatible. In the process, we got rid of the references to the primedia gem which doesn't appear to be publicly available.