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
Tommy Deeter
2,660 PointsMigrating Database Issues
Hi everyone! I recently started the "Build a simple Ruby on Rails Application" deep dive, and I've run into some problems. When Jason tells us to run the command "rake db:migrate" this is displayed..
Jim-Deeters-MacBook:treebook tommydeeter25$ rake db:migrate
Jim-Deeters-MacBook:treebook tommydeeter25$ rake db:migrate
rake aborted!
/Users/tommydeeter25/treebook/db/migrate/20130729205955_create_statuses.rb:5: syntax error, unexpected ':'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:537:in `load_migration'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:533:in `migration'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:528:in `migrate'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:720:in `block (2 levels) in migrate'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:775:in `call'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:775:in `block in ddl_transaction'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/transactions.rb:208:in `transaction'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:775:in `ddl_transaction'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:719:in `block in migrate'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:700:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:700:in `migrate'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:570:in `up'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:551:in `migrate'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/railties/databases.rake:179:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
Thanks in advance! I appreciate the help, as I am just starting Ruby on Rails.
Tommy
1 Answer
missgeekbunny
37,033 PointsOn line 5 of your create status migrate file you have a colon it doesn't like. That's what the first part of the error said. So it's just some type of syntax error and so you just need to see where the colon it doesn't like is.
Tommy Deeter
2,660 PointsTommy Deeter
2,660 PointsThank you very much! I went back into the file and I found the error. There was an extra colon in there. I appreciate your help!