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

markers shown in rails 3.0, but map is blank in rails 3.2 #193

Closed vmortega closed 12 years ago

vmortega commented 12 years ago

I'm upgrading my app from Rails 3.0.x to 3.2.x. In Rails 3.0.x a script is inyected at the bottom with all the logic to put the markers in my map. But in Rails 3.2 (asset pipeline activated) a script googlemaps.js is imported, but is blank, doesn't have marker o creation of the map.

What's wrong?

apneadiving commented 12 years ago

Did you copy the assets in your app? If so did you update it?

apneadiving commented 12 years ago

did you add gmaps4rails files in your pipeline?

vmortega commented 12 years ago

Yes, just like the README I don't have a assets/gmaps4rails folder or a assets/gmaps4rails/googlemaps.js file it's dynamically generated, right?

apneadiving commented 12 years ago

I advise to copy assets in your app using the rails g task

Sent from my iPhone

On 21 avr. 2012, at 01:41, vicoarreply@reply.github.com wrote:

Yes, just like the README I don't have a assets/gmaps4rails folder or a assets/gmaps4rails/googlemaps.js file it's dynamically generated, right?


Reply to this email directly or view it on GitHub: https://github.com/apneadiving/Google-Maps-for-Rails/issues/193#issuecomment-5255327

apneadiving commented 12 years ago

Is this ok now?

orthodoX commented 12 years ago

I am able to reproduce the issue @vicoar has on Rails 3.2.3. I ran the rails g task, all the js files are loaded in, but I also get the empty map_container.

apneadiving commented 12 years ago

Do you have the pipeline enabled? Could I have an url or see the html code?

Sent from my iPhone

On 29 avr. 2012, at 02:47, Slobodan Erakreply@reply.github.com wrote:

I am able to reproduce the issue @vicoar has on Rails 3.2.3. I ran the rails g task, all the js files are loaded in, but I also get the empty map_container.


Reply to this email directly or view it on GitHub: https://github.com/apneadiving/Google-Maps-for-Rails/issues/193#issuecomment-5401602

orthodoX commented 12 years ago

Yes, the asset pipeline is enabeld by default. Here is the example url http://dev.welcome2montenegro.com/en/hoteli/bokeska-noc It is a hotel on google maps with latitude 42.4514, and longitude 18.5533

apneadiving commented 12 years ago

Seems you simply forgot to include <%= yield :scripts %>

On Apr 30, 2012, at 2:47 PM, Slobodan Erak wrote:

Yes, the asset pipeline is enabeld by default. Here is the example url http://dev.welcome2montenegro.com/en/hoteli/bokeska-noc It is a hotel on google maps with latitude 42.4514, and longitude 18.5533


Reply to this email directly or view it on GitHub: https://github.com/apneadiving/Google-Maps-for-Rails/issues/193#issuecomment-5416618

vmortega commented 12 years ago

I included gmaps for google, and base, but still seeing a blank map. If assets pileline is enabled, is necesary to put <%= yield :scripts %>?

apneadiving commented 12 years ago

Yes it's necessary to include yield :scripts, and it's written cleraly in the gem's requirements

Sent from my iPhone

On 30 avr. 2012, at 19:36, vicoarreply@reply.github.com wrote:

I included gmaps for google, and base, but still seeing a blank map. If assets pileline is enabled, is necesary to put <%= yield :scripts %>?


Reply to this email directly or view it on GitHub: https://github.com/apneadiving/Google-Maps-for-Rails/issues/193#issuecomment-5422885

orthodoX commented 12 years ago

Thank you very much @apneadiving! It worked. I also thought as @vicoar that yield :scripts is only for Rails without asset pipeline.

apneadiving commented 12 years ago

@orthodoX : nice to hear that, I've just released 1.5.0 and (hopefully) clearer Readme

vmortega commented 12 years ago

It worked!, thanks