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 Build a Simple Ruby on Rails Application Testing the Whole App Integration Tests

When I try to do integration test it complaints as unknown database for the test. If I run rake db:test:prepare

I can not run any tests from this video. When I type rake db:test:prepare it says this command is deprecated. Then it says unknown database for the test. What should I do?

2 Answers

Alexander Batalov
Alexander Batalov
21,887 Points


$ rake db:migrate RAILS_ENV=test
Brandon Barrette
Brandon Barrette
20,485 Points

To add to this, since you are using Rails 4, this is the new way to update the test database. If using rails 3, then you would follow along with the videos.

It asked me to do db:create first :) So I did rake db:create db:migrate RAILS_ENV=test and it works now! thanks!