Problem switching from DataMapper to Active Record in Rails 3
I have removed my DataMapper specific models and gems in my Rakefile and removed开发者_C百科 all databases. I also updated my database.yml file. Now, when I attempt to generate a model with
rails g model Car year:integer make:string model:string
I get:
No value provided for required options '--orm'
Is there someplace that I am missing the specification of Active Record? I've been unable to find any documentation for switching an application's ORM.
Have a look in config/application.rb
, you may have a line that looks like this:
config.generators do |g|
g.orm :datamapper
end
Change that :datamapper
symbol to :active_record
or remove that line completely to switch back to ActiveRecord.
If it's not there, you may have a file in config/initializers
which does this setup for you.
精彩评论