I'm trying to add a rake task from a gem (geocoder https://github.com/alexreisner/geocoder) from a rake task of my application, as i would like it to be run just after the database is built.
So i have this code inside a rakefile
task :geolocal do
spec = Gem::Specification.find_by_name 'geocoder'
load "#{spec.gem_dir}/lib/tasks/geocoder.rake"
puts '##################GEOCODING##############'
Rake::Task["geocode:all CLASS=ProposedAccomodation"].execute
end
just following this question Ruby Rake load tasks from a gem but i keep getting the same error
Don't know how to build task 'geocode:all CLASS=ProposedAccomodation'
any clue what i'm doing wrong?