你好,我已經架式遷移,一切都很好,但是當我rake db:migrate
我得到外殼上的以下錯誤信息:遷移未定義的局部變量或方法'T」
== CreateClients: migrating ==================================================
-- create_table(:clients)
-- t()
rake aborted!
An error has occurred, this and all later migrations canceled:
undefined local variable or method ` t' for #<CreateClients:0x00000102a5a7c8>
Tasks: TOP => db:migrate
這裏是在遷移文件DB /遷移目錄:
# encoding: UTF-8
class CreateClients < ActiveRecord::Migration
def self.up
create_table :clients do |t|
t.string :name
t.string :adress
t.integer :telephone
t.string :email
t.text :comments
t.timestamps
end
end
def self.down
drop_table :clients
end
end
能
任何人幫助嗎?
是這個導軌2.3.x版本或3.x版 – topek
發佈完整的錯誤的機會嗎?這可能是導致Active Record無法按預期運行的寶石問題。上面的代碼片段看起來很好。 –
它的導軌3.1.1。 Ben按照Ben的要求添加了完整的消息錯誤。 – blawzoo