1

Today I had updated my ruby and rails versions using rvm on Linux/Ubuntu. Unfortunately, now an older applications doesn't work any more, although I haven't touched it.

    rake importpostings
    rake aborted!
    undefined method `map' for :needs:Symbol

The rake file looks like:

    task :importpostings, :needs => :environment do |task|
    Mail.defaults do
    ...
Dave Chen
  • 10,887
  • 8
  • 39
  • 67
Peterb
  • 239
  • 4
  • 11

2 Answers2

0

Remove needs and write the task like this :-

  task:importpostings  =>  :enviornment
Nikita Singh
  • 370
  • 3
  • 12
  • Thanks for you reply, but it doesn't work. Seems that I can't access the model. rake aborted! uninitialized constant Object::Account – Peterb Oct 15 '13 at 20:19
0

I found a solution by replacing the first line with:

    task importpostings: :environment do 
Peterb
  • 239
  • 4
  • 11