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

ActiveRecord::StatementInvalid (Could not find table 'statuses'): app/controllers/statuses_controller.rb:5:in `index'

I downloaded the project files after going through test writing and getting errors. Thought I would get them right before that badge and do it over. Upon copying over files I had I got this error when trying to access the site

ActiveRecord::StatementInvalid (Could not find table 'statuses'): app/controllers/statuses_controller.rb:5:in `index'

app/controllers/statuses_controller.rb:5:in `index'

That 5th line in the file just has: @statuses = Status.all

I did a rake db:migrate and it told me:

rake aborted! You have already activated rake 10.1.0, but your Gemfile requires rake 0.9.2.2. Using bundle exec may solve this.

Any ideas? Thanks!

1 Answer

Check what version of Rails and Ruby you are running. If you were to copy over the files, it won't just work. They are working on an older version of Ruby and Rails, so if the syntax isn't right for the newer version, you may need to scale back.

Also, can you give us what you have for lines 5-11 also? Maybe something in that method is not right.