小编Tac*_*che的帖子

Rails 3.1.0,geokit,错误acts_as_mappable

我得到了

undefined local variable or method `acts_as_mappable'
Run Code Online (Sandbox Code Playgroud)

使用geokit时出错,经过大量的Goggling和尝试后,我似乎无法纠正问题.

基本上,我安装了以下宝石:

geokit (1.6.0, 1.5.0)
geokit-rails31 (0.1.3)
Run Code Online (Sandbox Code Playgroud)

并在我的模型中有以下内容

class House < ActiveRecord::Base
  acts_as_mappable
end
Run Code Online (Sandbox Code Playgroud)

和Gemfile:

gem 'geokit', '>= 1.5.0'
gem 'geokit-rails31'
Run Code Online (Sandbox Code Playgroud)

我在本地应用程序中执行或不执行以下操作时收到错误.

rails plugin install git://github.com/jlecour/geokit-rails3.git
Run Code Online (Sandbox Code Playgroud)

geokit ruby-on-rails-plugins ruby-on-rails-3.1

1
推荐指数
1
解决办法
1532
查看次数