Undefined `namespace 'method for # <Jquery :: Rails :: Engine: 0x102530798> in rake db: create: ll

When running rake db:create:all , the following error appears:

 rake aborted! undefined method `namespace' for #<Jquery::Rails::Engine:0x102530798> 

The rake file is as follows:

 require File.expand_path('../config/application', __FILE__) module ::TestProject class Application include Rake::DSL end end module ::RakeFileUtils extend Rake::FileUtilsExt end TestProject::Application.load_tasks 

What's going on here?

+4
source share
2 answers

I had the same problem and I add Rake::DSL to TestProject::Application.load_tasks to make it work. I don't know if this is good, but it works for me! (Sorry, if I made a mistake, I speak French.)

+4
source

Really adding:

include Rake::DSL

shortly before load_tasks helped me solve this problem.

+1
source

All Articles