Thanks Neener54, but I think I found the answer.
Instead of running:
rails g model Blogpost
I need to run
rails g active_record:model Blogpost
and that should generate all the ActiveRecord files, even though I
have mongoid installed.
However, now I am running into issues with migration and trying to use
the Devise plugin.
After installing the Devise plugin and auto-generating a User
ActiveRecord model using:
rails g active_record:devise User
I try to run my migrations. Here is the error output:
undefined method `devise' for User(Table doesn't exist):Class
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
I tried the same flow in a separate project, except using only
ActiveRecord with no Mongoid and I was able to run migrations
successfully. Apparently, Mongoid is messing up my ActiveRecord
classes when I try to run rake.
Would anyone have a solution? For example, is there a similar way to
force rake to use ActiveRecord, such as when using rails-generate
(rails g active_record:***)?
By the way, I'm using ruby 1.9.2p290, Rails 3.1.0, Mongoid 2.3,
bson_ext 1.4, and devise 1.5.3.
Thanks in advance