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 trialBarry Timilow
31 PointsError ActionView::MissingTemplate
I am not sure why but I am getting this error when trying to run my edit_spec. Here is the link to my github project https://github.com/hondoh/ODOT
Editing todo items is successful with valid content (FAILED - 1)
Failures:
1) Editing todo items is successful with valid content Failure/Error: click_link "Edit" ActionView::MissingTemplate: Missing template todo_items/edit, application/edit with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in: * "/Library/Ruby/Gems/2.0.0/gems/web-console-2.0.0/lib/action_dispatch/templates" * "/Users/hsh2692/projects/odot/app/views" # ./spec/features/todo_items/edit_spec.rb:20:in block (3 levels) in <top (required)>' # ./spec/features/todo_items/edit_spec.rb:19:inblock (2 levels) in '
Finished in 0.30641 seconds 1 example, 1 failure
Failed examples:
rspec ./spec/features/todo_items/edit_spec.rb:17 # Editing todo items is successful with valid content
1 Answer
Maciej Czuchnowski
36,441 PointsYour view file uses a wrong extension. You have app/views/todo_lists/edit.rb while it should be either .erb or .html.erb. Just rename the file and it should work fine.