Search code examples
ruby-on-railsmongodbmongoidslugruby-on-rails-4

rails 4 mongoid. mongoid_slug is not installing


I have started new project, installed mongoid, when i tried to install mongoid_slug it is giving me error.

I did not used --skip-active-record.

Bundler could not find compatible versions for gem "mongoid":
  In Gemfile:
    mongoid_slug (~> 3.0.0) ruby depends on
      mongoid (> 3.0) ruby

    mongoid (1.0.6)

Gemfile

gem 'mongoid'
gem 'mongoid_slug', '~> 3.0.0'

Solution

  • You have to use the master branch of Mongoid as the Rails 4 compatibility was just recently merged and no version has been released since.

    gem 'mongoid', git: 'git://github.com/mongoid/mongoid.git'
    gem 'mongoid_slug', '~> 3.0.0'