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!
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 trial
Ali GULEZ2,500 Points
NoMethodError when generating scaffold with Rails 4.1.4.
I was following 'Generate a Scaffold' under 'Build a Todo List Application with Rails' and I have Ruby 2.1.2. and Rails 4.1.4. installed on my Mac. I have followed every step as shown in the video until typing 'bin/rails generate scaffold todo_list title:string description:text' in the console. When I do so I get the following error after 'spec/controllers/todos_controller_spec.rb' is created;
template': undefined methodupdate_attributes' for #<Rails::Generators::ActiveModel:0x007fe79e5bc038> (NoMethodError)
I believe this is something to do with earlier version of Ruby and Rails used for this tutorial. Could someone please help me solve this issue? Many thanks.
Robert HoCourses Plus Student 11,383 Points
I'm not sure if this matters as much but in the video it shows that name of the file should be
'spec/controllers/todo_lists_controller_spec.rb' but you have 'spec/controllers/todos_controller_spec.rb', which means you are missing the word lists in the file name. Good luck!
Dejan Eremic5,359 Points
I have the right name of the file, but the same problem... Please help if someone figured out what's the problem?