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

Ruby Build a Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Viewing Todo Items: Part 1

Table is generating rows starting at id 3


When I run the rspec rspec/features/todo_items/index_spec.rb I get the error <code>Unable to find css "todo_item_2"</code>. But when I reproduce the same in the browser I can see that the table rows are starting at id 3 instead of 1. Would this be because the database is not reset every time, and I need to migrate it again?


Fredrik A. Madsen-Malmo

EDIT: The error code I receive upon running rspec | The file that I run with rspec

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

Please provide the error content, your code for the failing test and the page it relates to, using Ruby markup to make it more readable.

Thanks for the reply. Give me a second and I'll add.

1 Answer

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

OK, this:

within "todo_list_#{todo_list.id}" do

should probably become this:

within "#todo_list_#{todo_list.id}" do

You're a lifesaver! :)

Thanks a lot man, if you feel like saving more lifes, please take a look at my other question :)