namespace :maps do desc 'Seed the maps!' task :seed => :environment do require 'app/models/map' csv_filename = File.expand_path( '../../db/capital-cities.csv', File.dirname(__FILE__) ) Map.import(csv_filename) do |map| puts "Seeded map '#{map.name}'" end end end