I'm trying to create a simple application with Ruby on Rails. I've created this scaffold:
rails generate scaffold Pic title:string content:blob description:text
and when I try to migrate db with rake db:migrate
I'm getting this error:
rake aborted!
An error has occurred, this and all later migrations canceled:
undefined method `blob' for #<ActiveRecord::ConnectionAdapters::TableDefinition:0xb74f8ec4>
When I write say text
instead of blob
it works normally. So what's the problem with blob
?
The keyword is binary, not blob.
rails generate scaffold Pic title:string content:binary description:text