Skip to content

Instantly share code, notes, and snippets.

@clayton
Created July 2, 2010 05:38
Show Gist options
  • Select an option

  • Save clayton/460977 to your computer and use it in GitHub Desktop.

Select an option

Save clayton/460977 to your computer and use it in GitHub Desktop.

Revisions

  1. clayton created this gist Jul 2, 2010.
    20 changes: 20 additions & 0 deletions deploy_tips
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    desc "Show ps"
    task :ps do
    run 'ps ax' do | channel, stream, data |
    puts data if stream == :out
    if stream == :err
    puts "[err: #{channel[:host]}] #{data}"
    break
    end
    end
    end

    desc "Stream log from rails"
    task :log, :roles => :app do
    stream "tail -f #{current_path}/log/#{rails_env}.log"
    end

    desc "Get uptime from server"
    task :uptime, :roles => :app do
    run 'uptime'
    end