2012-01-14 13 views
0

mysqlを使用してデータベースを移行する際に問題が発生し、すべてのものを水から吹き飛ばし、postgresを使用することに決めました。データベースと一緒に正しくインストールしましたが、今はmysqlを使用していたときと同じエラーが表示されます。rake db:migrateの後でrakeが中止されました

$ rake db:migrate 
rake aborted! 
/Users/beach180/rails_projects/app/db/migrate/20120114221528_create_users.rb:6: syntax   error, unexpected ':', expecting keyword_end 
    t.string "email" :default => "", :null => false 

これは、RBファイル

class CreateUsers < ActiveRecord::Migration 
    def up 
    create_table :users do |t| 
     t.string "first_name", :limit => 25 
     t.string "last_name", :limit => 50 
     t.string "email" :default => "", :null => false 
     t.string "password", :limit => 40 
     t.timestamps 
    end 
    end 

    def down 
    drop_table :users 
    end 
end 

が任意のアイデアを得たのですか?

答えて

2

"email"という文字列の後にコンマがありません。

t.string "email", :default => "", :null => false 
       ^comma 
+0

うん、そうだった。別のエラーの別のチケットを作成しようとしています。 Thx Dave :) – beach180

関連する問題