Removing deprecation warnings on rails 4
Fixing tests and dependencies for rails4