Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,440 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,440 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 :)