Skip to content

Instantly share code, notes, and snippets.



Created Aug 18, 2012
What would you like to do?
Mongoid_slug is not installed
I have gem mongoid (3.0.4, 3.0.1)
My Gemfile looks like:
source ''
gem 'rails', '3.2.6'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://'
gem "mongoid", "~> 3.0.0"
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See for more supported runtimes
gem 'execjs'
gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
gem 'jquery-rails'
gem 'stringex'
gem 'mongoid_slug'
$> bundle install
Fetching gem metadata from
Fetching gem metadata from
Bundler could not find compatible versions for gem "mongoid":
In Gemfile:
mongoid_slug (>= 0) ruby depends on
mongoid (~> 2.0.0.beta7) ruby
mongoid (3.0.1)
My Controller is:
class Post
include Mongoid::Document
include Mongoid::Slug
field :name, type: String
field :title, type: String
field :content, type: String
validates :title, :presence => true, :length => { :minimum => 10 }
has_many :comments
slug :name
On webpage, when I run, I get:
Routing Error
uninitialized constant Mongoid::Slug
Try running rake routes for more information on available routes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment