2010-04-10 44 views
0

查看此處的完整錯誤:http://notesapp.heroku.com/奇怪的DataMapper(0.10.2)錯誤。請幫忙!

我正在使用DataMapper和dm-validations 0.10.2。無論我調整模型多少,我都會得到相同的錯誤或其他錯誤。以下是我的模型的樣子:

class User 
    include DataMapper::Resource 

    attr_accessor :password, :password_confirmation 

    property :id, Serial, :required => true 
    property :email, String, :required => true, :format => :email_address, :unique => true 
    property :hashed_password, String 
    property :salt, String, :required => true 
    property :created_at, DateTime, :default => Time.now 
    property :permission_level, Integer, :default => 1 

    validates_present :password_confirmation, :unless => Proc.new { |t| t.hashed_password } 
    validates_present :password, :unless => Proc.new { |t| t.hashed_password } 
    validates_is_confirmed :password 

回答

1

看起來您已經安裝了舊版本的DataObjects(可能在0.10.0之前)。請更新到最新版本,我認爲這個錯誤會消失。根據您使用的數據庫,最有可能是您需要升級的do_postgres或do_mysql。

+0

不直接解決問題,而是以正確的方式引導我。謝謝。 – 2010-04-10 19:30:56