Make gem dependency compatiable with rails 4