[WIP] Update to rails 4 1 x

This PR is under progress, we need to test the app generation and deploy.

Will close #323