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 Simple Ruby on Rails Application Getting Started with Rails Generate a Rails Application

rake db:migrate not working

When I get to the point where I have already created the scaffolding, I run rake db:migrate and after about a minute of nothing, it opens up a new command line. No error messages or anything. When I then try to run the server, it shows that I need to migrate. Please Help!

4 Answers

Tatiana Perry
Tatiana Perry
17,156 Points

Hey Owen, Rails has a habit of not working with PC. Treehouse has a virtual box for Windows users and provides instructions because of the Windows issues like this.

http://teamtreehouse.com/library/installing-a-ruby-development-environment/installing-a-ruby-development-environment/treehouse-vm-overview

thank you, I will try that

Tatiana Perry
Tatiana Perry
17,156 Points

I use a Linux so the commands maybe a bit different navigate to your application folder

$ rails generate scaffold status name:string content:text
$ rake db:migrate

there is a colon between db and migrate

Also what system are you using. I could not get anything to work on a windows computer.

Thanks for the help, but still nothing. the way I am formatting it is $ rake db:migrate

PC

Robert Ho
PLUS
Robert Ho
Courses Plus Student 11,383 Points

Were you ever able to start the server before? What happens when you run rails generate scaffold? Was it for the scaffold generation for the status resource?

The scaffold generates fine. What happens, is that when I run the server after running migrate, an error message shows up in the middle of the lronpt telling me to migrate. It also shows up on the server page