Update rails to fix a vulnerability

Update other gems, cause why not
Using rails 4.0.5 as suggested by @invisiblefunnel
Update gems, using a version of rails compatible with current gemset
Merge branch 'update-gems'