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 trialLachlan Dawson
10,007 PointsGetting an error called ActiveRecord::PendingMigrationError
After adding this
add_colomn :statuses, :user_id, :integer
add_index :statuses, :user_id
remove_colomn :statuses, :name
to my new add_user_id_to_statuses.rb
and preforming a rake db:migrate
i get this message when i start up my local server again
ActiveRecord::PendingMigrationError
2 Answers
Lachlan Dawson
10,007 PointsAccidentally misspelled column
Brent Sullivan
9,877 PointsI open up my terminal, descend to my 'treebook' directory and then enter 'rails server' into the console. I then copy the link (http://0.0.0.0:3000) to see if I am Riding Ruby on Rails and I get an error message in my browser:
ActiveRecord::PendingMigrationError
Migrations are pending; run 'bin/rake db:migrate RAILS_ENV=development' to resolve this issue.
Rails.root: /Users/BrentSullivan/treebook
Any idea how to fix? Thanks!