轨道上的红宝石地图没有显示出来

时间:2014-06-08 15:30:54

标签: ruby-on-rails google-maps gmaps4rails

我更新了我的gemfile以包含地理编码器和gmaps4rails并遵循版本2教程,它加载页面但没有地图。我不知道为什么会这样。

的application.js

// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require underscore
//= require gmaps/google
//= require_tree .

character_controller文件

class CharactersController < ApplicationController
  before_action :set_character, only: [:show, :edit, :update, :destroy]

  # GET /characters
  # GET /characters.json
  def index
    @characters = Character.all
    #json = Character.all.to_gmaps4rails
    @hash = Gmaps4rails.build_markers(@characters) do |character, marker|
  marker.lat character.latitude
  marker.lng character.longitude
end
  end

我还完成了捆绑更新和捆绑安装,多次重启服务器。我错过了什么吗?

请告知@apneadiving

0 个答案:

没有答案
相关问题