# Getting started with rails guide: Encountering problems at Section 5.1

**URL:** <https://www.ruby-forum.com/t/getting-started-with-rails-guide-encountering-problems-at-section-5-1/236144>\
**Category:** Rails\
**Created:** [August 9, 2013, 12:35pm UTC](https://www.ruby-forum.com/t/getting-started-with-rails-guide-encountering-problems-at-section-5-1/236144 "2013-08-09T12:35:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [August 9, 2013, 12:35pm UTC](https://www.ruby-forum.com/t/getting-started-with-rails-guide-encountering-problems-at-section-5-1/236144/1 "2013-08-09T12:35:45Z")

</div>

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](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:

[image: Another routing error, uninitialized constant PostsController]

How should I go resolve this issue?

_I’m currently using ruby 2.0.0 and Rails 4.0.0_

---

<div class="post-metadata">

**Author:** ![Jenson\_Lu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@Jenson\_Lu](https://www.ruby-forum.com/u/Jenson_Lu)\
**Post date:** [August 9, 2013, 12:39pm UTC](https://www.ruby-forum.com/t/getting-started-with-rails-guide-encountering-problems-at-section-5-1/236144/2 "2013-08-09T12:39:17Z")

</div>

Why don’t you do what the error says?

run “rake db:migrate RAILS\_ENV=development”

–  
Dheeraj K.

---

<div class="post-metadata">

**Author:** ![Jenson\_Lu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@Jenson\_Lu](https://www.ruby-forum.com/u/Jenson_Lu)\
**Post date:** [August 9, 2013, 4:37pm UTC](https://www.ruby-forum.com/t/getting-started-with-rails-guide-encountering-problems-at-section-5-1/236144/3 "2013-08-09T16:37:40Z")

</div>

On 9 August 2013 11:38, Dheeraj K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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

---

<div class="post-metadata">

**Author:** ![Jenson\_Lu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@Jenson\_Lu](https://www.ruby-forum.com/u/Jenson_Lu)\
**Post date:** [August 9, 2013, 6:31pm UTC](https://www.ruby-forum.com/t/getting-started-with-rails-guide-encountering-problems-at-section-5-1/236144/4 "2013-08-09T18:31:38Z")

</div>

On Fri, Aug 9, 2013 at 10:53 AM, Tamara T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> 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.

---

<div class="post-metadata">

**Author:** ![Jenson\_Lu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@Jenson\_Lu](https://www.ruby-forum.com/u/Jenson_Lu)\
**Post date:** [August 9, 2013, 5:54pm UTC](https://www.ruby-forum.com/t/getting-started-with-rails-guide-encountering-problems-at-section-5-1/236144/5 "2013-08-09T17:54:47Z")

</div>

On Aug 7, 2013, at 11:28 AM, Jenson Lu [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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](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

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.

---

<div class="post-metadata">

**Author:** ![Jenson\_Lu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@Jenson\_Lu](https://www.ruby-forum.com/u/Jenson_Lu)\
**Post date:** [August 9, 2013, 11:33pm UTC](https://www.ruby-forum.com/t/getting-started-with-rails-guide-encountering-problems-at-section-5-1/236144/6 "2013-08-09T23:33:43Z")

</div>

On Aug 9, 2013, at 11:30 AM, Jordon B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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.

---

<div class="post-metadata">

**Author:** ![Jenson\_Lu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@Jenson\_Lu](https://www.ruby-forum.com/u/Jenson_Lu)\
**Post date:** [August 10, 2013, 10:45am UTC](https://www.ruby-forum.com/t/getting-started-with-rails-guide-encountering-problems-at-section-5-1/236144/7 "2013-08-10T10:45:12Z")

</div>

On 9 August 2013 22:32, Tamara T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > 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
