Capistrano のインストール
rubygems パッケージをインストールする。一緒に ruby 1.8 がインストールされる。
$ sudo aptitude install rubygems
次に、gem コマンドを使って capistrano をインストール。
$ sudo gem install -y capistrano Bulk updating Gem source index for: http://gems.rubyforge.org Successfully installed capistrano-2.0.0 Successfully installed net-ssh-1.1.2 Successfully installed needle-1.3.0 Successfully installed net-sftp-1.1.0 Successfully installed highline-1.4.0 Installing ri documentation for net-ssh-1.1.2... Installing ri documentation for needle-1.3.0... Installing ri documentation for net-sftp-1.1.0... Installing ri documentation for highline-1.4.0... Installing RDoc documentation for net-ssh-1.1.2... Installing RDoc documentation for needle-1.3.0... Installing RDoc documentation for net-sftp-1.1.0... Installing RDoc documentation for highline-1.4.0...
そして、動作確認するが・・・。
$ cap -h bash: cap: command not found
どうやら、/var/lib/gems/1.8/bin にパスが通っていなかったためらしい・・・。パスを通すと動いた。
$ cap -h Usage: cap [options] action ... -e, --explain TASK Displays help (if available) for the task. -F, --default-config Always use default config, even with -f. -f, --file FILE A recipe file to load. May be given more than once. -H, --long-help Explain these options. -h, --help Display this help message. -p, --password Immediately prompt for the password. -q, --quiet Make the output as quiet as possible (default) -S, --set-before NAME=VALUE Set a variable before the recipes are loaded. -s, --set NAME=VALUE Set a variable after the recipes are loaded. -T, --tasks List all tasks in the loaded recipe files. -V, --version Display the Capistrano version, and exit. -v, --verbose Be more verbose. May be given more than once. -X, --skip-system-config Don't load the system config file (capistrano.conf) -x, --skip-user-config Don't load the user config file (.caprc)