0
我正在学习一个教程,但本教程使用的是Rails 2.0。 但是,我正在使用Rails 4.0。 我想这种差异在做耙子迁移时会遇到麻烦吗?rake migrate aborted trouble
[组图/ DB /迁移/ 20130722034245_create_photos.rb]
class CreatePhotos < ActiveRecord::Migration
def change
create_table :photos do |t|
t.timestamps
end
end
def self.up
create_table :photos do |photo|
photo.column "filename", :string
end
end
def self.down
drop_table :photos
end
end
[在我的终端]
[email protected] ~/Desktop/Projects/photos$ rake migrate
rake aborted!
Don't know how to build task 'migrate'
/usr/local/rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
/usr/local/rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `<main>'
(See full trace by running task with --trace)
已解决.. 'rake migrate'是旧版本的命令。 :/ 这样做..'rake db:create' – seoyoochan