geokit / geokit-rails

Official Geokit plugin for Rails/ActiveRecord. Provides location-based goodness for your Rails app. Requires the Geokit gem.
MIT License
1.57k stars 245 forks source link

acts_as_mappable not getting correct database adapter_name #8

Closed hudson-gev-art closed 13 years ago

hudson-gev-art commented 14 years ago

When I try and use the acts_as_mappable integration, I always get the error message 'jdbc' is not a supported adapter. Does this mean that this plugin will not work with jruby?

It looks like connection.adapter_name in acts_as_mappable fails if the name is 'jdbc' but hardcoding mySQL seems to work... I'm not sure if that is the correct solution. Any advice would be appreciated.

volkert commented 14 years ago

I had the same error and found the following solution that looks like it is working: The error occurs because there is no adapter file for jdbc. So if you are using jdbc with mysql, just copy the 'mysql.rb' file in the 'adapters' folder of the plugin geokit-rails and rename it to 'jdbc.rb'. Don't forget to rename the classname in this file to 'JDBC'. I don't know if it is also working with jdbc and other DBs but maybe it does. My current tests work on this solution.

hudson-gev-art commented 13 years ago

Thanks, this solved my problem.