ruby - NoMethodError: undefined method `get' for #<Class:0xa3b9e1c> rails rake task -
i having error when running rake task. rake used run correctly before.
rake aborted! nomethoderror: undefined method `get' #<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 running task --trace)
my rake task:
require 'data_providers/providers' # affiliation rake namespace :affiliation desc "create affiliations" task :create => :environment affiliationdataprovider.new.create end desc "update affiliations" task :update => :environment affiliationdataprovider.new.update end end
similarly there other rake task in same file ran before not now.
this trace
** invoke affiliation:update (first_time) ** invoke environment (first_time) ** execute environment ** execute affiliation:update rake aborted! nomethoderror: undefined method `get' #<class:0xa6aae3c> /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/dynastyowner-api/lib/data_providers/affiliation.rb:19:in `update' /home/munam/projects/ror/tftus/dynastyowner-api/lib/tasks/data_providers.rake:12:in `block (2 levels) in <top (required)>' /home/munam/.rvm/gems/ruby-2.1.4/gems/rake-10.4.2/lib/rake/task.rb:240:in `call' /home/munam/.rvm/gems/ruby-2.1.4/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute' /home/munam/.rvm/gems/ruby-2.1.4/gems/rake-10.4.2/lib/rake/task.rb:235:in `each' /home/munam/.rvm/gems/ruby-2.1.4/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute' /home/munam/.rvm/gems/ruby-2.1.4/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain' /home/munam/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize' /home/munam/.rvm/gems/ruby-2.1.4/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain' /home/munam/.rvm/gems/ruby-2.1.4/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke' /home/munam/.rvm/gems/ruby-2.1.4/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task' /home/munam/.rvm/gems/ruby-2.1.4/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level' /home/munam/.rvm/gems/ruby-2.1.4/gems/rake-10.4.2/lib/rake/application.rb:106:in `each' /home/munam/.rvm/gems/ruby-2.1.4/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level' /home/munam/.rvm/gems/ruby-2.1.4/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads' /home/munam/.rvm/gems/ruby-2.1.4/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level' /home/munam/.rvm/gems/ruby-2.1.4/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run' /home/munam/.rvm/gems/ruby-2.1.4/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling' /home/munam/.rvm/gems/ruby-2.1.4/gems/rake-10.4.2/lib/rake/application.rb:75:in `run' /home/munam/.rvm/gems/ruby-2.1.4/gems/rake-10.4.2/bin/rake:33:in `<top (required)>' /home/munam/.rvm/gems/ruby-2.1.4/bin/rake:23:in `load' /home/munam/.rvm/gems/ruby-2.1.4/bin/rake:23:in `<main>' /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 => affiliation:update
Comments
Post a Comment