2010-04-10 3 views
0

전체 오류보기 : http://notesapp.heroku.com/Strange DataMapper (0.10.2) 오류입니다. 도와주세요!

저는 DataMapper와 dm-validation 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

직접 문제를 해결하지는 않지만 올바른 방법으로 나를 조종했습니다. 감사. –