Getting started with rails guide: Encountering problems at Section 5.1

Hi people,

I need some help here. I’m new to ROR, and is following the guideline on “Getting started with rails”. The inputs have been accurate and are running well until section:

“5.1 Laying down the ground word”**. **

While navigating to http://localhost:3000/posts/new the error message display were:

ActiveRecord::PendingMigrationError

Migrations are pending; run ‘rake db:migrate RAILS_ENV=development’ to resolve this issue.

instead of what was suggested in the guide which is suppose to be:

How should I go resolve this issue?

I’m currently using ruby 2.0.0 and Rails 4.0.0

Why don’t you do what the error says?

run “rake db:migrate RAILS_ENV=development”

Why don't you do what the error says?

run "rake db:migrate RAILS_ENV=development"

Though you won't normally need RAILS_ENV=development as it should default to that. First have a look in db/migrate and see if you have accidentally created a new migration.

Colin

At this stage of the game, it's hard to hear "yer doin it rong" but something did go wrong. You should not have received that message if you were following the getting started tutorial from the beginning. If you were doing other things, you may have created a migration which the system is complaining about. My suggestion at this point is to start the Getting Started tutorial from scratch with a brand new rails app in a brand new directory.

WAT? Why would you start over when you could just rake db:migrate? It's quite easy to miss that when it tells you to run it, and missing it is a far better in how to correctly build migrations than being told to do it, because now you've learned the hard way to always migrate. I find it ignorant that anybody would tell somebody to start over again rather than tell them how they broke it and to fix it and the simple solution is: "You forgot to run a migration like they told you to, lesson: run `rake db:migrate` after every migration.

Up to that point in the tutorial, there should not have been any migrations created.

Its all a bit irrelevant anyway since the OP has shown no further interest. Perhaps he worked out what he was doing wrong and is too embarrassed to reply.

Colin