2010-10-23 65 views
11

我开始学习使用该导轨红宝石: getting_started,我建立了我的项目和数据库,但是当我运行耙分贝:迁移我得到这个错误:Ruby on Rails的耙分贝:迁移错误

@mona-Extensa-5230:~/rubyDev/Sites/blog# rake db:migrate
(in /home/mona/rubyDev/Sites/blog)
== CreatePosts: migrating ==================================================== -- create_table(:posts)
rake aborted!
An error has occurred, this and all later migrations canceled:
private method `String' called for#
ActiveRecord::ConnectionAdapters::TableDefinition:0xb7540f30>

谢谢。

回答

30

看起来你有这样的一行在迁移过程中的一种:

t.String

注意,s需要使用小写字母(t.string