Upgrade rails

Go to 3.2.12 following security advisory.

Also bumps json to 1.7.7.