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 Creating an Authentication System Generating the User Model

Migrations are pending; run 'bin/rake db:migrate RAILS_ENV=development' to resolve this issue.

Tried this solution "Migrations are pending; run 'bin/rake db:migrate RAILS_ENV=development' to resolve this issue.", and nothing changed.

9 Answers

Kang-Kyu Lee
Kang-Kyu Lee
52,045 Points

I suggest rather download project files and try again. In Gemfile of project files, its rails version

gem 'rails', '3.2.6'

(I think rails course soon will be updated) And you may find out more by the button on your question above or link.

Try again? From what point? This is the second time that I have started over with "Build a Simple Ruby on Rails Application." The word "Simple" is a bit misleading. You think this course will be updated soon? When? I have spent more time trying to rectify errors than I have working on the actual project. I am starting over from the beginning of this track... for the third time. Jason Seifer & Jim Hoskins

Kang-Kyu Lee
Kang-Kyu Lee
52,045 Points

Well.. I agree that ruby related info gets easily outdated (probably more than other subjects) but in case we follow along this video, I simply tried to suggest as a first thing - look up your Gemfile and rails version.

I appreciate your help kang kyu lee. I downloaded the projects files again, and the Gemfile contains (gem 'rails', '4.0.1') not (gem 'rails', '3.2.6'), and I am running ruby version 2.0.0 p353.

What now?

Kang-Kyu Lee
Kang-Kyu Lee
52,045 Points

I just now tried myself and what I did...

~/treebook-stage-3$ subl .
~/treebook-stage-3$ ruby -v
~/treebook-stage-3$ rbenv global 1.9.3-p547 
~/treebook-stage-3$ rails -v
~/treebook-stage-3$ gem install bundler --no-ri --no-rdoc
~/treebook-stage-3$ bundle
~/treebook-stage-3$ rails -v
Rails 3.2.6
~/treebook-stage-3$ ruby -v
ruby 1.9.3p547
~/treebook-stage-3$ rake db:migrate
~/treebook-stage-3$ rake routes
~/treebook-stage-3$ rails server

and then opened http://localhost:3000/users/sign_up in the browser. (and it didn't show the error mentioned in your post) just in case, Gemfile in the folder looks like this (and rails in it was 3.2.6) :

source 'https://rubygems.org'

gem 'rails', '3.2.6'

gem 'sqlite3'
gem 'devise'

group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

How do I downgrade to ruby 1.9.3 p547 ? I am running ruby version 2.0.0 p353, and I tried reverting to an older version without any success.

How do I downgrade to ruby 1.9.3 p547 ? I am running ruby version 2.0.0 p353, and I tried reverting to an older version without any success.

kang kyu lee

Now I see "ActiveRecord::StatementInvalid in StatusesController#index" when I open the web browser with localhost:3000. I have only exacerbated the problem. I would really like to finish this part of the track some time this month... This is ridiculous.

Here is what I have: rails -v Rails 3.2.6 ruby -v Ruby 1.9.3p545

Kang-Kyu Lee
Kang-Kyu Lee
52,045 Points

Great you found out about ruby versions and it seems almost there.. and now something wrong with a statement in index method of StatusesController. I am not so sure but seems like.. did you rake db:migrate?

or.. it can be some other parts. Good luck!