apneadiving / Google-Maps-for-Rails

Enables easy Google map + overlays creation in Ruby apps
https://apneadiving.github.io/
MIT License
2.26k stars 382 forks source link

Rails 4, Gmaps4rails v2 with precompiled assets on Heroku -- no map showing #397

Closed mtc2013 closed 10 years ago

mtc2013 commented 10 years ago

Hi, I've used your gmaps4railsv1 gem in a project before and am hoping to upgrade that version 2 with rails 4 upgrade.

I know that v1 was not compatible with certain aspects of the rails 4 pipeline and never worked for me with rails 4 on heroku.

I created the following minimalist app to deploy to Heroku to understand gmaps4railsv2:

https://github.com/mtc2013/gmaps4railsv2

This app works fine locally but when I deploy to heroku, the map does not display at all.

In the js console in firefox I get:

[16:32:33.954] ReferenceError: Gmaps is not defined

[16:32:38.973] Error in parsing value for 'background'. Declaration dropped

I also notice that unlike the local developmetn version, my deployed app does not display script tags in the header pointing to sources as follows:

"/assets/jquery.js "/assets/jquery_ujs.js? "/assets/turbolinks.js? "/assets/underscore.js? "/assets/gmaps/base.js

and so on.

So I've apparently broken some aspect of the pipeline.

If you had any suggestions, that would be a great help. Should this work with heroku? have you tested it? I may well be doing something incredibly dumb in what i've done though I tried to base it off your tutorial video.

apneadiving commented 10 years ago

On 13 Nov 2013, at 22:42, mtc2013 notifications@github.com wrote:

Hi, I've used your gmaps4railsv1 gem in a project before and am hoping to upgrade that version 2 with rails 4 upgrade.

I know that v1 was not compatible with certain aspects of the rails 4 pipeline and never worked for me with rails 4 on heroku.

I created the following minimalist app to deploy to Heroku to understand gmaps4railsv2:

https://github.com/mtc2013/gmaps4railsv2

This app works fine locally but when I deploy to heroku, the map does not display at all.

In the js console in firefox I get:

[16:32:33.954] ReferenceError: Gmaps is not defined

[16:32:38.973] Error in parsing value for 'background'. Declaration dropped

I also notice that unlike the local developmetn version, my deployed app does not display the following links in the header:

So I've apparently broken some aspect of the pipeline.

If you had any suggestions, that would be a great help. Should this work with heroku? have you tested it? I may well be doing something incredibly dumb in what i've done though I tried to base it off your tutorial video.

— Reply to this email directly or view it on GitHub.

mtc2013 commented 10 years ago

Typing Gmaps in the console on the page shows it is undefined.

apneadiving commented 10 years ago

since its not related to gmaps4rails, please ask on stackoverflow