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

Missing gem warning #5

Closed laserlemon closed 3 years ago

laserlemon commented 14 years ago

I have geokit-rails installed, along with the geokit gem as outlined in the README. However, when I run rake gems:install I get the following error:

WARNING: geokit-rails requires the Geokit gem.

I've also tried adding require 'geokit' to the top of my config/initializers/geokit_config.rb file, but to no avail. I can actually stop the warning if I add that line to the top of the plugin's init.rb file, but I'm not keen on poking into the plugin code to make it behave. Could you please address these warnings? Thank you!

laserlemon commented 14 years ago

This is with the latest geokit-rails plugin on Rails 2.3.4 with geokit 1.5.0.

Jasonbit commented 14 years ago

I'm getting the same warning. Love geokit, but that warning is annoying.

kbrock commented 14 years ago

JackDanger has patched his branch to fix this. I brought in the change and it fixed this issue for me

lenart commented 14 years ago

Adding require 'geokit' to the top of config/initializers/geokit_config.rb solves the problem!

laserlemon commented 14 years ago

It certainly does not for me, as mentioned in the original post.

lenart commented 14 years ago

@laserlemon: on the gem's site they say that one way of fixing this bug is adding require to the top of plugin's init.rb. They'll probably fix this in future versions.

P.S. I understand your problem with "hacking the plugins code" :)

laserlemon commented 14 years ago

Thanks for the advice. I do know that that's one way to fix it, but obviously it's not ideal. I'm posting here in hopes that andre will add that himself. For now, to avoid plugin h4x, I'm adding this to the top of my environment.rb:

begin; require 'geokit'; rescue LoadError; end

Any plans on resolving this, andre? Thanks!

bcardarella commented 14 years ago

+1 for pulling in JackDanger's patch. It is more elegant than the other suggested solutions

laserlemon commented 14 years ago

Any updates on this issue? Thanks.

timtrautmann commented 14 years ago

Would be nice to get the patch into the master since this error is so annoying.

tatyree commented 14 years ago

I'll add my +1 for the JackDanger patch. Had to use laserlemon's solution in the first instance, but it should have a proper fix.

phstc commented 13 years ago

I sent a pull request to Andre, to resolve this issue ;)

I hope that Andre accept it

ryankopf commented 3 years ago

No activity in 10 years, because I think this has been fixed in a release several years ago.