<!DOCTYPE html>
<html>
<head>
  <title>Forest Guardian</title>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

  <%= javascript_include_tag  'fg_mobile' %>
  <%= stylesheet_link_tag 'fg_mobile', media: 'all' %>

  <style>
    body {
      padding: 0;
      margin: 0;
    }
    html, body, #map {
      height: 100%;
      width: 100%;
    }
    .leaflet-right .leaflet-control {
      margin-right: 10px;
      display: none;
    }
  </style>
</head>
<body>
<div id="map"></div>
<script type="text/javascript">

    /**
     * Created by luisalonsomurilloalonso on 05/05/16.
     */
    $(function() {
      /* Central America weather perspectives */
        var wmsLayer = L.tileLayer.wms('http://138.68.63.173/geoserver/ows?', {
            layers: 'perspectiva_ca_mjj',
            styles: 'perspectiva_ca_mjj',
            transparent: true,
            format: 'image/png'
        });
        fg_layers.push(wmsLayer);
    });

</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
  <title>Forest Guardian</title>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

  <%= javascript_include_tag  'fg_mobile' %>
  <%= stylesheet_link_tag 'fg_mobile', media: 'all' %>

  <style>
    body {
      padding: 0;
      margin: 0;
    }
    html, body, #map {
      height: 100%;
      width: 100%;
    }
    .leaflet-right .leaflet-control {
      margin-right: 10px;
      display: none;
    }
  </style>
</head>
<body>
<div id="map"></div>
<script type="text/javascript">

  /**
   * Created by luisalonsomurilloalonso on 05/05/16.
   */
    /* Central America weather perspectives */
      var wmsLayer = L.tileLayer.wms('http://138.68.63.173/geoserver/ows?', {
          layers: 'perspectiva_ca_mjj',
          styles: 'perspectiva_ca_mjj',
          transparent: true,
          format: 'image/png'
      });
      fg_layers.push(wmsLayer);
</script>
</body>
</html>
Remove call from inside ready.
Remove call from inside ready.
