Enable to work with rails4

Referenced #49