Make gem Rails 4 compatible