Skip to content

Instantly share code, notes, and snippets.

@kaochenlong
Last active August 29, 2015 14:18
Show Gist options
  • Save kaochenlong/bb6b6567d6e4db7f71f2 to your computer and use it in GitHub Desktop.
Save kaochenlong/bb6b6567d6e4db7f71f2 to your computer and use it in GitHub Desktop.
Rake Combo Tasks
desc "Happy Combo Tasks"
task :happy => :environment do
puts "Log Clear!"
Rake::Task["log:clear"].invoke # 執行 rake log:clear
puts "DB Migrate!"
Rake::Task["db:migrate"].invoke # 執行 rake db:migrate
puts "whatever you want!" # 還有其它你想做的事
system "bin/rails server" # 執行 rails server
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment