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 trialSako Kassabian
13,796 PointsActiveRecord::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
42,016 Pointstry running
rake test:prepare
and see if that solves anything
Sako Kassabian
13,796 PointsSako Kassabian
13,796 PointsNope, it didn't do anything. How can I undo a scaffold?
Sako Kassabian
13,796 PointsSako Kassabian
13,796 PointsFound the issue, I had accidentally typed test instead of text when I wrote description:text in my scaffold call.
Stone Preston
42,016 PointsStone Preston
42,016 Pointstry 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