Update rails version

Update to latest 3.2.X rails and depenencies.
Fix misc bugs related to the upgrade