Created
April 6, 2015 08:54
-
-
Save dhiemstra/d12eea5b5ebd28e250f1 to your computer and use it in GitHub Desktop.
Rake task to execute some common rails commands on Engineyard
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
APP_NAME='..' | |
PATH="/data/#{APP_NAME}/current" | |
namespace :ey do | |
desc "Open production rails console" | |
task :console do | |
exec "ey ssh -t 'cd #{PATH} && bin/rails console production'" | |
end | |
desc "Open production psql command" | |
task :dbconsole do | |
exec "ey ssh -t 'cd #{PATH} && bin/rails dbconsole production -p'" | |
end | |
desc "Tail production log" | |
task :logs do | |
exec "ey ssh -t 'tail -n 500 -f #{PATH}/log/production.log'" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don't forget to add
gem 'engineyard'
to your Gemfile's development group.