我正在设置Trailblazer的部署,但是我是一个新的Rails用户,我可以对这个问题使用一点方向。
我已经安装了所有必需的Gems,但是Reform
gem没有正常运行并且它正在抛出错误。
loading extension..."/Users/smilingbuddha/web/aardvark/app/concepts/recent_upgrade/contract"
Exiting
/Users/smilingbuddha/.rvm/gems/ruby-2.3.0/gems/reform-2.2.1/lib/reform/validation.rb:6:in `validation_groups': undefined local variable or method `validation_group_class' for RecentUpgrade::Contract::Create:Class (NameError)
Did you mean? validation_groups
from /Users/smilingbuddha/.rvm/gems/ruby-2.3.0/gems/reform-2.2.1/lib/reform/validation.rb:13:in `validation'
from /Users/smilingbuddha/.rvm/gems/ruby-2.3.0/gems/reform-2.2.1/lib/reform/validation.rb:19:in `validates'
from /Users/smilingbuddha/web/aardvark/app/concepts/recent_upgrade/contract.rb:8:in `<class:Create>'
from /Users/smilingbuddha/web/aardvark/app/concepts/recent_upgrade/contract.rb:3:in `<module:Contract>'
from /Users/smilingbuddha/web/aardvark/app/concepts/recent_upgrade/contract.rb:1:in `<top (required)>'
这是错误:
validation_groups: undefined local variable or method validation_group_class for RecentUpgrade::Contract::Create:Class (NameError)
有关如何运行此应用程序的任何想法? 谢谢!
以下是我们在contract.rb
property :property_id
validates :property_id, presence: true