Rails 3 谷歌地图
我正在尝试使用 gmaps4rails gem 创建一个示例项目: 但出现错误:
undefined method `gmaps’ for #
Rails.root: /var/www/brandbk
Application Trace | Framework Trace | Full Trace
app/controllers/locations_controller.rb:46:in `block in create’
app/controllers/locations_controller.rb:45:in `create’
Request
Parameters:
{“utf8″=>”вњ“”,
“authenticity_token”=>”CSpi+VhUe8CtF+4R6zxMEXbB8ofa0QxUF1ntGl+N1Ss=”,
“location”=>{“address”=>”rwr”},
“commit”=>”Create Location”}
像这样: http://pastebin.com/zGP9Z7vE 有人可以帮我吗?
我的模型和控制器是有效的,并且与项目 wiki 上的描述相同。 谢谢。
I'm trying to create a sample project with gmaps4rails gem:
But getting an error:
undefined method `gmaps’ for #
Rails.root: /var/www/brandbk
Application Trace | Framework Trace | Full Trace
app/controllers/locations_controller.rb:46:in `block in create’
app/controllers/locations_controller.rb:45:in `create’
Request
Parameters:
{“utf8″=>”вњ“”,
“authenticity_token”=>”CSpi+VhUe8CtF+4R6zxMEXbB8ofa0QxUF1ntGl+N1Ss=”,
“location”=>{“address”=>”rwr”},
“commit”=>”Create Location”}
Like this: http://pastebin.com/zGP9Z7vE
Can anyone help me please?
My models and controllers are valid and same as described on the project wiki.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它来自这里:
基本上,此行会阻止地理编码,如果:
因此有两种方法可以摆脱它:
check_process
设置为 falsegmaps
的模型(也可以使用方法来完成)更多详细信息:https://github.com/apneadiving/Google-Maps-for-Rails/wiki/Model-Customization
It comes from here:
Basically this line prevents geocoding if:
So two ways to get rid of it:
check_process
to falsegmaps
(this could be done with a method as well)Some more details here: https://github.com/apneadiving/Google-Maps-for-Rails/wiki/Model-Customization