mardi 12 mai 2015

I am having this error when I am running a rake task. The rake used to run correctly before.

rake aborted!
NoMethodError: undefined method `get' for #<Class:0xa3b9e1c>
/home/munam/.rvm/gems/ruby-2.1.4/gems/activerecord-    
4.1.6/lib/active_record/dynamic_matchers.rb:26:in `method_missing'
/home/munam/projects/ror/tftus/api/lib/data_providers/data_provider.rb:3:in `initialize'
/home/munam/projects/ror/tftus/api/lib/tasks/data_providers.rake:33:in `new'
/home/munam/projects/ror/tftus/api/lib/tasks/data_providers.rake:33:in `block (2 levels) in <top (required)>'
/home/munam/.rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `eval'
/home/munam/.rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => player:create
(See full trace by running task with --trace)

My rake task:

require 'data_providers/providers'

# Affiliation Rake
namespace :affiliation do
  desc "Create Affiliations"
  task :create => :environment do
    AffiliationDataProvider.new.create
  end

  desc "Update Affiliations"
  task :update => :environment do
    AffiliationDataProvider.new.update
 end
end

Similarly there are other rake task in the same file which ran successfully before but not now.

Aucun commentaire:

Enregistrer un commentaire