I have just recently cloned a sample rails application I am working on onto my macbook and I am trying to run rake db:migrate but I get the following error
rake aborted!
/Users/anderskitson/Sites/sample_app/db/migrate/20130207032207_add_password_digest_to_users.rb:5: syntax error, unexpected keyword_end, expecting $end
Here is the rb file
raclass AddPasswordDigestToUsers < ActiveRecord::Migration
def change
add_column :users, :password_digest, :string
end
end
You have a typo in the first line, first word (raClass). It should be:
Class AddPasswordDigestToUsers < ActiveRecord::Migration
def change
add_column :users, :password_digest, :string
end
end
尝试使用“class”而不是“Class”......
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.