2
我试图适应一段代码有:在模型定义什么DataMapper的插件提供了:空属性选项
property :email, String, :index => true, :null => false, :length => 1000
。我得到这个错误:
ArgumentError: options :null are unknown
from /usr/lib/ruby/gems/1.8/gems/dm-core-0.10.2/lib/dm-core/property.rb:901:in `assert_valid_options'
from /usr/lib/ruby/gems/1.8/gems/dm-core-0.10.2/lib/dm-core/property.rb:811:in `initialize'
from /usr/lib/ruby/gems/1.8/gems/dm-core-0.10.2/lib/dm-core/model/property.rb:51:in `new'
from /usr/lib/ruby/gems/1.8/gems/dm-core-0.10.2/lib/dm-core/model/property.rb:51:in `property'
所以我想我缺少一个DataMapper插件。