rails 4 support

- update the dependencies
- refactor the routes