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 Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Generate a Scaffold

ActiveRecord::PendingMigrationError

After running a rake db:migrate RAILS_ENV=test as the video suggested, I can no longer run rails because I get an error that tells me that migrations are pending. To resolve, I can run db:migrate RAILS_ENV=development, but that doesn't fix the issue either.

1 Answer

Stone Preston
Stone Preston
42,016 Points

try running

rake test:prepare

and see if that solves anything

Nope, it didn't do anything. How can I undo a scaffold?

Found the issue, I had accidentally typed test instead of text when I wrote description:text in my scaffold call.

Stone Preston
Stone Preston
42,016 Points

try running a plain

rake db:migrate 

first before you try and undo your scaffold. if you are sure you want to undo the scaffold you can use

rails destroy scaffold scaffoldName