RAKE DB无法迁移

时间:2014-04-02 13:28:59

标签: ruby ruby-on-rails-3 rake

C:\Users\MEGHA\bbbb>rake db:migrate
rake aborted!
SyntaxError: C:/Users/MEGHA/bbbb/db/migrate/20140402130040_create_comments.rb:4: syntax error, unexpected tIDENTIFIER, expecting keyword_end
C:65535:in `disable_ddl_transaction'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

迁移

class CreateComments < ActiveRecord::Migration
  def change
    create_table :comments do |t|
      t.integer :post_id
      t.text :body

      t.timestamps
    end
  end
end

1 个答案:

答案 0 :(得分:1)

bundle exec rake db:migrate

可能会帮助你...