Relax Rails dependency to support Rails 4