You can certainly use it with rails 4, provided you specify an additional (github) attribute, so bundler knows where to fetch the gem from. In this case, it will get it from github as opposed to rubygems. Rails 4 version of this gem is probably under development and not yet released, hence you need to get it from github.
Just go to your Gemfile and copy paste that line as it is, run bundle install and you are done.