控制台
注意:前方有危险。控制台非常不成熟,但它的架构比以前的版本干净得多,而且只会越来越好。
执行任意远程命令,要使用它,只需添加 require 'capistrano/console'
,它会将必要的任务添加到您的环境中
$ bundle exec cap staging console
然后,在设置服务器连接后,它可能看起来像这样
$ bundle exec cap production console
capistrano console - enter command to execute on production
production> uptime
INFO [94db8027] Running /usr/bin/env uptime on leehambley@example.com:22
DEBUG [94db8027] Command: /usr/bin/env uptime
DEBUG [94db8027] 17:11:17 up 50 days, 22:31, 1 user, load average: 0.02, 0.02, 0.05
INFO [94db8027] Finished in 0.435 seconds command successful.
production> who
INFO [9ce34809] Running /usr/bin/env who on leehambley@example.com:22
DEBUG [9ce34809] Command: /usr/bin/env who
DEBUG [9ce34809] leehambley pts/0 2013-06-13 17:11 (port-11262.pppoe.wtnet.de)
INFO [9ce34809] Finished in 0.420 seconds command successful.