運行命令,而我收到以下錯誤獲取建設任務的錯誤,同時運行耙分貝:遷移在軌道3
rake db:migrate VERSION=201504******.
錯誤:
rake aborted!
Don't know how to build task '20150419131135'
其實我有一個遷移文件already.Now我連接到一個新的數據庫。在這裏我想創建該數據庫中的表。請檢查我的下面的文件。
20150419131135_create_users.rb:
class CreateUsers < ActiveRecord::Migration
def self.up
if !table_exists? :users
create_table :users do |t|
t.string :contact_name
t.string :login_id
t.string :password_hash
t.string :password_salt
t.string :phone
t.string :address
t.timestamps
end
end
end
end
class CreateUsers < ActiveRecord::Migration
def self.down
drop_table :users if !table_exists?(:users)
end
end
遷移完成後,本我得到了上述error.Please幫我解決這個錯誤。
什麼,當你做到這'耙分貝約:migrate'(不含版) – jphager2