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 trialGaran Guillory
Courses Plus Student 19,291 PointsMigrations 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
52,045 PointsI 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.
Garan Guillory
Courses Plus Student 19,291 PointsTry 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
52,045 PointsWell.. 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.
Garan Guillory
Courses Plus Student 19,291 PointsI 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
52,045 PointsI just now tried myself and what I did...
- download https://s3.amazonaws.com/treehouse-code-samples/treebook-stage-3.zip and unzip (as
~/treebook-stage-3
directory)
~/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'
Garan Guillory
Courses Plus Student 19,291 PointsHow 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.
Garan Guillory
Courses Plus Student 19,291 PointsHow 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.
Garan Guillory
Courses Plus Student 19,291 PointsNow 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
52,045 PointsGreat 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!