0

I am working on the Hartl Ruby on Rails tutorial, Chapter Two (https://www.railstutorial.org/book/toy_app), and working from Cloud9. I have installed the gem using this code:

gem install rails -v 4.2.0.beta4

I then add the gems to the gemfile.

I then create the new toy app:

rails _4.2.0.beta4_ new toy_app

I cd to the toy_app.

Then I bundle install:

bundle install --without production

I then scaffold:

rails generate scaffold User name:string email:string

and then I rake:

bundle exec rake db:migrate

But I continually get an error message when I try to access the webpage from Cloud9: https://rails-tutorial-codertodd-3.c9.io/.

The error message usually reads as follows: Migrations are pending. To resolve this issue, run: bin/rake db:migrate RAILS_ENV=development

My friend also tried to do the same operation on a different computer and got the same error message. Any help would be much appreciated! Thanks!

-T

1 Answers1

0

If you follow Michael Hartl's tutorial and have problems with rake db:migrate command (and especially if you are using Cloud9 as development platform) your solution is to update Arel Gem...

just run: bundle update arel

If it is not working still, add this line to Gemfile into your development group:

gem 'arel', '6.0.0.beta2'

then run: bundle install and if it is complaining run; bundle update arel

migrations should be working now

Found suggestion in this post, so credit goes to https://stackoverflow.com/a/27140014/3251051

Community
  • 1
  • 1
Zalom
  • 696
  • 9
  • 18