Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJoel Buzzanco
Courses Plus Student 2,738 Points'rake db:migrate' gives the error 'rake aborted!'
When i run rake db:migrate I get the error 'rake aborted! NoMethodError: undefined method 'last_comment' for 3<Rake::Application:0x30814f8> C:/Users/TEST/projects/odot/rakefile:6:in `<top (required)>' (See full trace by running task with --trace)
I'm restarting this ruby todo list application over as I was having issues a few videos later, and it just seems like that possibly bc treehouse did this series with a former version of ruby, there have been a number of conflicts with the current ruby on rails for doing this application. I don't know, I guess I'm just getting frustrated bc it takes so long to solve simple issues that ends up being something stupid. Then that process would just repeat itself.
Anyways, if you know whats going wrong here, I'd appreciate your help. Thanks
It seems like someone else was having a similar issue with this. But I'm not too sure on how it was resolved. https://teamtreehouse.com/community/rake-aborted-nomethoderror-undefined-method-lastcomment
Joel Buzzanco
Courses Plus Student 2,738 PointsHi Martin Cornejo Saavedra,
I am using a recent rails version, but when I use sudo rake
, it is not recognized as an internal or external command in the command prompt on my windows 10 machine. Maybe because I am using a newer ruby for this than treehouse is why I am having this issue, but I don't know.
1 Answer
nick wesley
1,331 Pointsthis helped me a bit, although I'm still having problems
in Rails quick fix can be edit ./Rakefile (in your app folder)
and add these lines before calling Rails.application.load_tasks:
module TempFixForRakeLastComment def last_comment last_description end end
Martin Cornejo Saavedra
18,132 PointsMartin Cornejo Saavedra
18,132 PointsI used a recent rails version (Rails 4.2.5.1) and had no problem. Maybe you do not have enough privilieges? Did you try using sudo rake?