0

Receiving uninitialized constant Mongoid::Slug when trying to load a view.

The troubled Model is:

class Course
  include Mongoid::Document
  include Mongoid::Timestamps
  include Mongoid::Slug

  field :title, type: String
  slug :title

  validates :title, presence: true, uniqueness: true
end 

Gemfile is pulling in mongoid and mongoid-slug as so:

gem 'mongoid', github: 'mongoid/mongoid', branch: 'master'
gem 'mongoid_search', '0.3.2'
gem 'mongoid-slug', github: 'digitalplaywright/mongoid-slug'

gem list shows the versions of each installed as:

mongoid (4.0.0)                                                                                                                                                               
mongoid-slug (4.0.0)                                                                                                                                                          
mongoid-tree (2.0.0)                                                                                                                                                          
mongoid_search (0.3.2) 

Any suggestions as to what is occurring here?

Grant Trevor
  • 1,052
  • 9
  • 23

1 Answers1

0

All appears to have been resolved by restarting the dev environment.

Spun up the dev VM this morning and everything is happily playing along.

So perhaps after introducing mongoid-slug I should have just restarted the web server.

Grant Trevor
  • 1,052
  • 9
  • 23