Upgrade to Rails 4
Fix all the deprecations.