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.css and .js in 4 asset pipeline #394

Closed randoum closed 10 years ago

randoum commented 10 years ago

Hi,

Similar to this issue https://github.com/apneadiving/Google-Maps-for-Rails/issues/159

gmail4rails seems not to recognize that Rails 4 assets pipeline is enabled.

As a result it injects the js and the css files from the javascripts directory from the gem directory itself

Which caused the following error in my configuration (I noticed it while using capybara, did not notice in dev environment)

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

Using gmaps4rails v 1.5.6

I use the following workaround which fix the problem

module Gmaps4rails
  class ViewHelper
    def gmaps4rails_pipeline_enabled?
      true
    end
  end
end

For your information Thanks for your great work!! Cheers

apneadiving commented 10 years ago

why dont you use v2?

randoum commented 10 years ago

I will as soon as I have time to migrate

apneadiving commented 10 years ago

Have no time to dig this and 1.x is not meant to be rails4 compatible so I close this