Upgrades Ruby and Rails versions

* Fixes failing tests