Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Chris Gray10,305 Points
Rake aborted! NoMethodError: undefined method `last_comment'
Weird error on running rake db:migrate, when I try it I get
NoMethodError: undefined method
last_comment' for #<Rake::Application:0x007fe1f29c8cf0>
(See full trace by running task with --trace)
When I run it with --trace it seems to point to the issue being with rspec but I can't find any other occurence of this issue in Rails 4 with google, the only thing I can find are two references to the issue in Rails 2.
I've tried searching through the files to find any mention of the method and nothing comes up.
Hope this helps for a quick resolution as I cannot progress the videos without it.
If this is the same issue I had, you'll have to uninstall rake 11.0, go into Gemfile.lock, go to line 81 and change the rake file version number (I had to change mine to 0.9..6). Hope that helps, damn rake file had me frustrated for a while.
I've never seen that error from that file. However, you're running a migration, so the issue may be lurking within the migration, perhaps?
Can you post your migration file and the current schema, please?
Joel BuzzancoCourses Plus Student 2,738 Points
Hi, I am having the same issue as Chris Gray,
how do you uninstall rake 11.0 ? is it via command prompt? Then you said to change the rake file version to 0.9.6 . I know this may seem like a dumb question but I guess I don't know how to uninstall it.