on rails 3.2.11,geocoder version 1.1.8
在我的模型中:
class Venue
include Mongoid::Document
include Geocoder::Model::Mongoid
....
field :address, type: String
field :latitude, type: Float
field :longitude, type: Float
....
geocoded_by :address
after_validation :geocode, :if => :address_changed?
.....
end
当我尝试创建一个新的场地时,我会在Venue.create中找到一个跟踪控制器的错误
undefined method `coordinates=' for #<Venue....
为了切入追逐,我已经运行了bundle install并重新启动了应用服务器,因为安装了gem。
提前致谢。
答案 0 :(得分:0)