views:

14

answers:

0

I am using the import_with_load_data_in_file plugin to load large amounts of data quickly.

It works fine in console.

However, when calling it from a Rake task, I get:

undefined method `import_with_load_data_in_file' for #<Class:0x1038cd9e0>

That doesn't really make any sense. The plugin is installed, it's included in the model, and I can run the exact code from console.

And yes, I am including the :environment in my task:

namespace :populate do

  task(:db => :environment) do

I have to actually copy and paste the plugin code into my model and prefix the method names with the class name to make them class methods in order to work.