capistrano (3)
deploy な動作確認してるんですがでびあんならでは、なハマリ方したので備忘録まで。
でびあん系のソレは最近 /bin/sh が /bin/dash になってて
upload("install.sh", "/tmp", :via => :scp) run "chmod +x /tmp/install.sh && /tmp/install.sh"
みたいなソレを実行しようとしたら動かなくてハマりました。下記を追加して難を逃れております。
default_run_options[:shell] = '/bin/bash'
あと、なんとなく rvm 導入とか gem で云々みたいな一連の処理があるのであれば、スクリプトに纏めた方が良いみたいですね。
あ、もう一つ。rvm ガラミなんですが、あるディレクトリに .rvmrc を置いてそのディレクトリに cd する時に
============================================================================== = NOTICE = ============================================================================== = RVM has encountered a new or modified .rvmrc file in the current directory = = This is a shell script and therefore may contain any shell commands. = = = = Examine the contents of this file carefully to be sure the contents are = = safe before trusting it! ( Choose v[iew] below to view the contents ) = ==============================================================================
みたいな事聞かれて処理が止まってたんですが、
ーhttp://goo.gl/4gGWL
によると
rvm rvmrc trust <path>
なコマンド実行でなんとかなるかと思ったらそうでもなく、仕方が無いので ~/.rvmrc に以下を仕込んでどうなるか。
rvm_trust_rvmrcs_flag=1
deploy.rb の記述てきには以下となっております。
run "echo 'rvm_trust_rvmrcs_flag=1' > .rvmrc"
とりあえず正常終了はしてませんが、ハードルは超えてる模様。