Rake Migrate Syntax Error

When in Terminal on Mac OS X, I get this syntax error when I run the "rake migrate" command:

rake migrate --trace (in /Users/dillon/Documents/rails/expenses/expenses) ** Invoke migrate (first_time) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate rake aborted! ./db/migrate//001_accounts.rb:1: syntax error, unexpected ':', expecting '\n' or ';' endndrop_table :accountset, :floatle|ion                                                                           ^ /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:343:in `migration_classes' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:248:in `inject' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:342:in `each' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:342:in `inject' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:342:in `migration_classes' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:330:in `migrate' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:297:in `up' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:288:in `migrate' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/tasks/databases.rake:4 /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `call' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `each' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:369:in `invoke' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `synchronize' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `invoke' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:376:in `invoke_prerequisites' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `each' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `send' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `each' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:375:in `invoke_prerequisites' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:368:in `invoke' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `synchronize' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `invoke' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `each' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rake-0.7.2/bin/rake:7 /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/bin/rake:16:in `load' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/bin/rake:16

Dillon Decicio wrote:

./db/migrate//001_accounts.rb:1: syntax error, unexpected ':', expecting '\n' or ';' endndrop_table :accountset, :floatle|ion                                                                           ^

There appears to be an error in your migration file. It seems like you have an extra colon, perhaps at the end of a line, but without seeing the migration contents it's difficult to say for sure...

Mark Bush wrote:

Dillon Decicio wrote:

./db/migrate//001_accounts.rb:1: syntax error, unexpected ':', expecting '\n' or ';' endndrop_table :accountset, :floatle|ion                                                                           ^

There appears to be an error in your migration file. It seems like you have an extra colon, perhaps at the end of a line, but without seeing the migration contents it's difficult to say for sure...

Here's the file:

Hey, that could be because of lf/cr issues.

Julian

How would you fix that lf/cr issue? Since, I'm not sure what it is based off of just following a tutorial and not experience.

Well I can't see anything wrong with the syntax of your migration, so
I'm kind of clutching at straws.

You're using OS/X, so if you're also using TextMate, you shouldn't
have any issues. I'd say the other part of your code would be causing
issues too if it really were an lf/cr issue.

It's an odd issue!

Julian.

The issue turned out to be in the config file database.yml.

I fixed that, and now it's telling my database on MySQL isn't set up.

I have a database for this application....

But for some reason it still says the command won't work. Do you know any reason that might occur?

Alright... Now I've tried re-installing Locomotive, and creating an entirely new rails application.

This was the output when I followed the instructions over: