I got undefined local variable or method \'address_geo\' for main:Object
with the following rake task. What\'s the problem with it?
include Geokit::
I would propose to extract the methods into a module or class. This is because methods defined in rake files end up defined on the global namespace. i.e. they can then be called from anywhere, not just within that rake file (even if it is namespaced!).
This also means that if you have two methods with the same name in two different rake tasks, one of them will be overwritten without you knowing it. Very deadly.
A great explanation is available here: https://kevinjalbert.com/defined_methods-in-rake-tasks-you-re-gonna-have-a-bad-time/