Last active
August 29, 2015 14:18
-
-
Save kaochenlong/bb6b6567d6e4db7f71f2 to your computer and use it in GitHub Desktop.
Rake Combo Tasks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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