Gem upgrades (and removal)

This is the first batch gem changes needed for compatibility with Rails 4.