kristianmandrup / gmaps-autocomplete-rails

Google Maps v3 search with jQuery UI Autocomplete, ready for use with Rails asset pipeline
MIT License
73 stars 35 forks source link

file name of gmaps-autocomplete.js is wrong #12

Closed woyzeck closed 10 years ago

woyzeck commented 10 years ago

Sorry if this issue might be stupid, but I'm quite new to rails.

I can't get it to run, and after investigating into the issue I think that the file 'vendor/assets/gmaps-autocomplete.js' is missing in the gem.

The file seems to be named 'gmaps-auto-complete.js'

kristianmandrup commented 10 years ago

https://github.com/kristianmandrup/gmaps-autocomplete-rails/tree/master/vendor/assets/javascripts

From README

Add to javascript manifest file, fx application.js

//= require jquery_ujs
//= require jquery.ui.all
//= require gmaps-auto-complete

PS: I have been notified that //= require gmaps-autocomplete should work, but I don't see why/how, since the js file is called gmaps-auto-complete.js.

woyzeck commented 10 years ago

Using "//= require gmaps-auto-complete" leads to "couldn't find file 'gmaps-auto-complete'" Using "//= require gmaps-autocomplete" works, but GmapsCompleter can't be found

woyzeck commented 10 years ago

Ok, I solved it.

The problem was that my gemfile used the latest released version of gmaps-autocomplete-rails, which's not compatible with the current documentation (thus the name-mismatch).

Using gem 'gmaps-autocomplete-rails', :git => "https://github.com/kristianmandrup/gmaps-autocomplete-rails.git" works.

kristianmandrup commented 10 years ago

Great! I will fix it ASAP. You are also welcome to improve the gem and update the docs ;) then I will make a new release...

theasteve commented 7 years ago

@woyzeck It didn't work for me. I have in the application.js //= require gmaps-autocomplete application.scss *= require gmaps-autocomplete Gemfile gem 'gmaps-autocomplete-rails', :git => "https://github.com/kristianmandrup/gmaps-autocomplete-rails.git"

I get the following error:

couldn't find file 'gmaps-autocomplete' with type 'text/css'

onerinas commented 7 years ago

@theasteve Please try require gmaps-auto-complete