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

gmaps4rails javascript google libraries not found #373

Closed robertochingon closed 10 years ago

robertochingon commented 10 years ago

I´m trying to display a Google Maps with gmaps4rails following the instructions from https://github.com/apneadiving/Google-Maps-for-Rails but I´m not able to display the map.

I have the gem gmaps4rails (1.5.6) installed with bundle.

I can see the javascripts included in my view source code:

However, please have a look at the paths of these scripts. It tries to get the javascripts from /javascript path (where there is nothing), instead of /assets (as I have seen in other examples). I think this is the root cause of the problem, however I don´t know how to solve it (I´m almost newbie with rails).

When the server tries to render the view, got this error:

Started GET "/javascripts/gmaps4rails/gmaps4rails.base.js" for 127.0.0.1 at 2013-09-18 13:01:35 +0200

ActionController::RoutingError (No route matches [GET] "/javascripts/gmaps4rails/gmaps4rails.base.js"):

Thanks in advance, Roberto.

isaachier commented 10 years ago

I had the same issue. I was able to resolve it by including the git source in the Gemfile instead of the regular gem and running bundle update; rails g gmaps4rails:install.

Hope this helps,

Isaac

apneadiving commented 10 years ago

cant understand, do you have the pipeline enabled? how did you require the files?

isaachier commented 10 years ago

I do have the pipeline enabled. With the old gem, I had issues when using the gem even though the pipeline was enabled. It would install the views into the public folder even though that did not work with the pipeline. Somehow, the GitHub source worked for me when requiring it in the Gemfile instead of the regular RubyGem source.