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 trialDavid Forero
5,492 PointsHello, I am getting the following error: "Could not find generator model todo_item."
When I run bin/rails generate modeltodo_item todo_list:references content:string
Not sure what happens. I run the bundle and everything else till that spot.
2 Answers
Maciej Czuchnowski
36,441 PointsTry omitting the bin/, copy and run this:
rails g model todo_item todo_list:references content:string
David Forero
5,492 PointsThanks Maciej this worked out :
rails g model TodoItem todo_list:references content:string
why this one and not the standard one from the video?
Maciej Czuchnowski
36,441 PointsI'm not really sure. As far as I know, this is just an alternative syntax (with camel case and no underscores) and both commands should work.
David Forero
5,492 PointsDavid Forero
5,492 PointsMaciej thanks for your prompt response, however it has not worked. Not sure what is wrong.
Maciej Czuchnowski
36,441 PointsMaciej Czuchnowski
36,441 PointsOK, try these lines:
rails g model TodoItem todo_list:references content:string
and
rails g model Todo_item todo_list:references content:string