2

When I run any rake command like rake routes I get the following error:

rake aborted!
NoMethodError: undefined method `last_comment' for #<Rake::Application:0x007f4873711d40>
/home/aldo/march_rails/phonebook/Rakefile:6:in `<top (required)>'

The line of code in my Rakefile that is being referenced is:

Rails.application.load_tasks

I have tried prepending bundle exec and I have tried deleting the Gemfile.lock and rerunning bundler but that didn't make any difference.

  • Possible duplicate to http://stackoverflow.com/questions/35893584/nomethoderror-undefined-method-last-comment-after-upgrading-to-rake-11/35893941 – HashRocket Mar 10 '16 at 09:26
  • Yes this question is a duplicate. That other answer solved my problem. Should I leave this question for others using the same wording or should i delete it? – aldo stevens Mar 10 '16 at 09:39
  • @aldostevens Others would disagree but my preference is to keep yours here to expand the "net" of people finding it. Sometimes people ask the same question in different ways and part of StackOverflow being so great is that there are multiple ways to ask the same question that leads to the same answer. I'll mark it as a duplicate but leave it here. – Joshua Pinter Apr 14 '18 at 17:40
  • Possible duplicate of [NoMethodError: undefined method \`last\_comment' after upgrading to rake 11](https://stackoverflow.com/questions/35893584/nomethoderror-undefined-method-last-comment-after-upgrading-to-rake-11) – Joshua Pinter Apr 14 '18 at 17:40

0 Answers0