Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoMethodError (undefined method `loaded' for Mysql2:Module) #89

Closed
IgorMiller opened this issue Dec 2, 2015 · 2 comments
Closed

NoMethodError (undefined method `loaded' for Mysql2:Module) #89

IgorMiller opened this issue Dec 2, 2015 · 2 comments

Comments

@IgorMiller
Copy link
Contributor

Hello. I dont know if anyone have ever had this issue, nothing is on Google, but my adapter is not loading correctly. I have investigated the issue, the problem was in acts_as_mappable.rb, line around 101

unless Adapters.const_defined?(connection.adapter_name.camelcase)
  filename = connection.adapter_name.downcase
  require File.join("geokit-rails", "adapters", filename)
end
klass = Adapters.const_get(connection.adapter_name.camelcase)

The klass was defined in Adapters.constants as a Module, and not as a class, resulting in NoMethodError (undefined methodloaded' for Mysql2:Module)`

I have fixed this and will create a pull request. But I don't know why "Mysql2" was defined in Adapters as a Module :s

@bertocq
Copy link

bertocq commented Jun 16, 2016

I have this error also, why is the PR not merged?

@mnoack
Copy link
Member

mnoack commented Jul 12, 2016

@bertocq it has now been merged. Purely a case of I don't always see notifications amongst everything else and also that things don't always pass coverage requirements, but I'll make exceptions, better a non covered bug fix than no bug fix.

@mnoack mnoack closed this as completed Jul 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants