capistrano

config/database.yml のデプロイ

問題1config/database.ymlはデータベースのパスワードが記述されているので、公開 Git リポジトリに push することができない。問題2Git で管理したとしても、development環境とproduction環境で設定が違う可能性がある。解決策Gitの管理対象から外し、デプ…

デプロイ先のサーバーで rake assets:precompile を実行するには

config/deploy.rb 29 after :restart, :clear_cache do 30 on roles(:web), in: :groups, limit: 3, wait: 10 do 31 # Here we can do anything such as: 32 within release_path do 33 # execute :rake, 'cache:clear' 34 execute :rake, 'assets:precompil…