Update gems and make compatible with rails4
Fix rails4 dep in gemspec