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

WARNING: geokit-rails requires the Geokit gem #12

Closed pupeno closed 3 years ago

pupeno commented 14 years ago

Even though I have the geokit gem installed, I keep getting this message:

WARNING: geokit-rails requires the Geokit gem. You either don't have the gem installed, or you haven't told Rails to require it. If you're using a recent version of Rails: config.gem "geokit" # in config/environment.rb and of course install the gem: sudo gem install geokit

Is it possible to make geokit-rails not print it when the geokit gem is installed.

jandjshi commented 14 years ago

i am having the same issue.

dfischer commented 14 years ago

I'm having this issue as well.

markysharky70 commented 14 years ago

Anybody ever get this solved? I'm also seeing it.

pupeno commented 14 years ago

I think adding geokit to the environment or the bundler fixed it for me.

markysharky70 commented 14 years ago

I guess my problem is a little different....I have config.gem "geokit" in my environment.rb but it doesn't stop the warning message as stated above. Very annoying.

sbwoodside commented 14 years ago

Very annoying. I added require 'geokit' to just after the require 'boot' in my environment.rb and this went away, but that solution sucks.

Fix this please!!!!

GeoffTidey commented 14 years ago

Adding require 'geokit' to the top of vendor/plugins/geokit-rails/init.rb stopped this warning message for me. (NB.\ had to chown the init.rb file owner from root to me before saving)

peterkappus commented 14 years ago

I've been able to get the warning messages to stop (adding "require 'geokit' to the top of config/environment.rb, oddly enough). But it's still not able to use location finders in my model... If I fire up the console and type:

Station.find(:all, :origin=>[51.53589283,-0.160854428], :within=>4)

I get the error:

ArgumentError: Unknown key(s): origin, within

I'm using Rails 2.3.8

Any help is much appreciated!

-pk

GeoffTidey commented 14 years ago

Hi pk, I have 2.3.8 as well, but went with this fork instead: http://github.com/kbrock/geokit-rails, as I didn't want to start playing around with mysql. And I'm happy to report that the syntax you used above (bar the model name) worked fine for me. Also I didn't have to update init.rb, as I previously noted above. Good luck, Geoff

ikko commented 13 years ago

Try using geokit-rails as a gem: config.gem 'geokit' config.gem 'geokit-rails' in your config/environment.rb

matthewkrom commented 13 years ago

ikko, thanks. Removing the plugin and using the gem was the solution in my case just now.

bill-evanson commented 11 years ago

Rails 3.2 in Gemfile: gem 'geokit', '1.6.5' gem 'geokit-rails'

Took care of the warning. Order seemed to be important

ryankopf commented 3 years ago

Geokit is now specified a a dependency in the gemspec, so this should be fixed. No activity in 7 years on this issue.