Skip to content

DEPRECATION WARNING when using mongomapper-versioned and Sorcery #2

@nachbar

Description

@nachbar

I am using MongoMapper and Sorcery with no problems. However, when I include the mongomapper-versioned in my Gemfile, I get the following warning when I start rails with either 'rails server' or 'rails console' :

DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in MongoMapper::Plugins::AutoIncrement instead. (called from <top (required)> at /Users/nachbar/work/2012/railstest/rm323/config/application.rb:13)

This is a barebones test application, created from scratch just for testing. The line referenced in application.rb is just the boilerplate created by the Rails application generation:

Bundler.require(*Rails.groups(:assets => %w(development test)))

In creating the application, I followed the instructions at http://mongomapper.com/documentation/getting-started/rails.html. Then, I added sorcery, by including in my Gemfile:

gem 'sorcery'
gem "bcrypt-ruby", :require => "bcrypt"

and running

bundle install
rails g sorcery:install

Now, I can test my setup:

rails console
User.new

which creates a user and returns the BSON ObjectId
Now, if I add

gem 'mongomapper-versioned'

to the Gemfile, and then

bundle install
rake versioned:create_indexes

I get the deprecation warning noted above (twice) after rake versioned:create_indexes. I get the same warnings any time I start rails with rails console or rails server. If I comment out the gem 'mongomapper-versioned' line in Gemfile, the warnings go away.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions