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 trial

Ruby

Getting same todo list id in every todo list item page.

I am going through "Build a Todo List Application with Rails 4" tutorial but I am working on rails 3.2. I have made the code changes accordingly. I am facing a problem when I click on List todo items link. I am getting same todo list id every time and thus list of items remain same for every todo list.

3 Answers

Brandon Barrette
Brandon Barrette
20,485 Points

So in the videos, Jason says that you should use Rails 4.0.x, where x can be any number, but should avoid rails 4.1 (as he mentions those upgrades may break compatibility).

I suggest following these instructions about setting up a ruby development environment: http://teamtreehouse.com/library/installing-a-ruby-development-environment In this video Jason uses rbenv to install ruby and rails. In this case you can set a global version of both ruby and rails, then set the specific version of rails for each project.

I learned ROR with the videos that follow with rails 3.2, this was actually a refreshing change of pace to learn rails 4.0. Going to be some work to upgrade my 3.2 app to a rails 4.0 app however.

Chase Lee
Chase Lee
29,275 Points

Try using rails 4.1.0. If you're using rvm then in the terminal, (assuming that you're on a Mac), write rvm use 4.1.0.

Is version difference can be cause of this issue?

Chase Lee
Chase Lee
29,275 Points

Possibly. Especially when it's that big of a difference in the rails versions. Try it and let me know what happens.

NOTE: I just realized that rvm might be only for Ruby. Try researching on how to change your version of rails and type that into the command line.