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

README outdated and referring to the wrong gem #13

Closed pmontrasio closed 10 years ago

pmontrasio commented 10 years ago

There are several mistakes in the README. I suppose it's outdated but it should be fixed because the errors we run into might discourage people from using this gem.

1) The single most important one is that gem 'gmaps-autocomplete-rails isn't loading your gem. We must refer to your repository as in

gem 'gmaps-autocomplete-rails', github: "kristianmandrup/gmaps-autocomplete-rails"

2) jquery-ui-rails reached version 5.0.0 and must be loaded with

//= require jquery-ui

instead of require jquery.ui.all

3) This must be added to include the stylesheets for the autocompleter

app/assets/stylesheets/application.css

*= require jquery-ui

As a side note, I had to //= require gmaps-auto-complete.js with the .js suffix because I disabled coffescript in the Gemfile.

pmontrasio commented 10 years ago

Actually, both gems are yours but the default version is outdated and not in sync with the README.

To help you debug the problem, the gemspec of the outdated gem is https://gist.github.com/pmontrasio/aeb15a618b5f288451bc

The gemspec of the gem I get when including the github option is https://gist.github.com/pmontrasio/2b69a7cd37d35740ef1e

pmontrasio commented 10 years ago

Finally, I noticed this message from bundle with the gem that works

gmaps-autocomplete-rails at /home/me/.rvm/gems/ruby-2.1.2@forever/bundler/gems/gmaps-autocomplete-rails-f9c604cf9d27 did not have a valid gemspec.
This prevents bundler from installing bins or native extensions, but that may not affect its functionality.
The validation message from Rubygems was:
  ["spec/index.html", "spec/init.js", "vendor/assets/javascripts/gmaps-autocomplete.js"] are not files
kristianmandrup commented 10 years ago

Thanks. I'm excluding the 3 non-existing files from the gemspec and releasing a new official version ASAP.

kristianmandrup commented 10 years ago

Pushed version 0.1.4. Hope it resolves most of the issues (I'm not using Rails at this point)

Successfully registered gem: gmaps-autocomplete-rails (0.1.4)

pmontrasio commented 10 years ago

Fixed, closing. Thanks!

kristianmandrup commented 10 years ago

Great! You are most welcome to fork this gem and take over from where I have left off. Would be nice to make it more "flexible", f.ex not to be coupled to jquery-ui and have a better class structure instead of the current flat one. Cheers!

pmontrasio commented 9 years ago

You're too kind to me. I don't make promises but I just I forked it to add a 3rd argument to updateUI, to pass the full geocoder response. Thank you for all the good work!

kristianmandrup commented 9 years ago

I would recommend the following redesign...

Split up the class into these classes:

Please spend 1-2 hours and see what you come up with ;) Also add a test suite (TDD). Cheers!

kristianmandrup commented 9 years ago

Checkout this branch:

https://github.com/kristianmandrup/gmaps-autocomplete-rails/tree/refactor

You are most welcome to work on it if you have time... :)