Ruby on rails 为什么rails中的blob数据类型会导致数据库迁移失败?

Ruby on rails 为什么rails中的blob数据类型会导致数据库迁移失败?,ruby-on-rails,ruby,sqlite,blob,dbmigrate,Ruby On Rails,Ruby,Sqlite,Blob,Dbmigrate,我正在尝试用ruby在rails中创建一个简单的应用程序。我创建了这个脚手架: rails generate scaffold Pic title:string content:blob description:text 当我尝试使用rake db:migrate迁移db时,我遇到了以下错误: rake aborted! An error has occurred, this and all later migrations canceled: undefined method `blob'

我正在尝试用ruby在rails中创建一个简单的应用程序。我创建了这个脚手架:

rails generate scaffold Pic title:string content:blob description:text
当我尝试使用
rake db:migrate
迁移db时,我遇到了以下错误:

rake aborted!
An error has occurred, this and all later migrations canceled:

undefined method `blob' for #<ActiveRecord::ConnectionAdapters::TableDefinition:0xb74f8ec4>
rake中止!
发生错误,此迁移和所有后续迁移已取消:
未定义的方法“blob”#

当我写的时候,说是
text
而不是
blob
,它工作正常。那么
blob
有什么问题呢?

关键字是二进制的,而不是blob

rails generate scaffold Pic title:string content:binary description:text
rails generate scaffold Pic title:string content:binary description:text

rails中没有关键字blob,您需要二进制