namespace :pizda do desc 'my first task' task :ivanovna do puts 'hello from pizda ivanovna' end desc 'load migrations' task :oyaeby do require 'rubygems' require 'rubygems/gem_runner' require 'ruby-debug' Rake::Task[:environment].invoke Rake::Task["db:load_config"].invoke ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true migrate_path = 'db/migrate' debugger if Rails::configuration.gems.map(&:name).include? :borda migrate_path = Gem.searcher.find('borda').full_gem_path + '/db/migrate' end ActiveRecord::Migrator.migrate(migrate_path, ENV["VERSION"] ? ENV["VERSION"].to_i : nil) end end