Google maps 未定义的局部变量或方法`作为可应用';

Google maps 未定义的局部变量或方法`作为可应用';,google-maps,gmaps4rails,Google Maps,Gmaps4rails,我创建了一个Heroku应用程序,它利用Gmaps4Gem作为应用程序的一个功能 当我试图给数据库添加种子时,我得到了 rake中止! 未定义的局部变量或方法对# 有没有办法解决这个问题 在本地测试时,一切正常 编辑:这是我的模型代码 class Hall < ActiveRecord::Base has_many :hall_features has_many :green_features, :through => :hall_features

我创建了一个Heroku应用程序,它利用Gmaps4Gem作为应用程序的一个功能

当我试图给数据库添加种子时,我得到了

rake中止!
未定义的局部变量或方法对#

有没有办法解决这个问题

在本地测试时,一切正常

编辑:这是我的模型代码

    class Hall < ActiveRecord::Base

      has_many :hall_features
      has_many :green_features, :through => :hall_features
      has_many :settings, :through => :pinned_halls
      belongs_to :operational_unit

      acts_as_gmappable
      ...
教室:霍尔功能
有多个:设置,:通过=>:固定
属于:操作单位
可作为
...
迁移:

class CreateHalls < ActiveRecord::Migration
  def up
    create_table 'halls' do |t|
      t.string 'name'
      t.text 'background'
      t.text 'energy_info'
      t.float 'latitude'
      t.float 'longitude'
      t.boolean 'gmaps'
      t.timestamps
    end
  end

  def down
    drop_table 'halls' # deletes the whole table and all its data!
  end
end
class

这是来自我的终端的错误:

Ugh。。将gem置于:仅在Gemfile中开发。包括:生产解决了所有问题


今晚我要哭着睡觉了。也有一些幸福的泪水。

您是否捆绑并重新加载了服务器?我在尝试让它工作时多次“捆绑安装”和“捆绑更新”。一直在尝试“heroku run rake db:migrate”(这很好),“heroku restart”来重新启动进程“heroku run rake db:seed”,这再次出现同样的错误。我已经做了几个小时了。隐马尔可夫模型。。。