Interact with your remote console

August 31st, 2006

via errtheblog

Interact with your remote console! Just add this to deploy.rb

RUBY:
  1. desc "remotely console"
  2. task :console, :roles => :app do
  3.   input = ''
  4.   run "cd #{current_path} && ./script/console #{ENV['RAILS_ENV']}" do |channel, stream, data|
  5.     next if data.chomp == input.chomp || data.chomp == ''
  6.     print data
  7.     channel.send_data(input = $stdin.gets) if data =~ /^(>|\?)>/
  8.   end
  9. end

snippits, programming, ruby on rails | Comments | Trackback Jump to the top of this page

Leave a Reply

  •  
  •  
  •  

You can keep track of new comments to this post with the comments feed.

Recently on Flickr

    mull - 21.jpgmull - 20.jpgmull - 19.jpgmull - 18.jpg

Recently Listened

Meta

The Carousell