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 Generate a Scaffold

Cody Scandore
Cody Scandore
521 Points

Pending Migration Error

I see this when I direct my browser to localhost:3000.

ActiveRecord::PendingMigrationError Migrations are pending. To resolve this issue, run: bin/rake db:migrate RAILS_ENV=development

Did not solve when I ran the command as directed.

Also, there was extensive output from console when I ran bin/rake db:migrate commands, as in video.

Francois van der Hoven
Francois van der Hoven
2,026 Points

Hi Cody, a PendingMigrationError occurs when you have created a new migration, but you have not yet run the migration. Look at /db/schema.db. It tells you the status of your development database. Were there perhaps some errors when you performed your last migration. Remember, the errors in your console help you to understand what went wrong.

Vlad Filiucov
Vlad Filiucov
10,665 Points

Have you made some changes manually in your migrations before running it? What database are you using? If you are using postgres or mysql it might happen that the user of the database doesn't have the permissions to create or migrate databases.

Some output for the error could be useful to debug it.