APP_ROOT do puts '== Installing dependencies ==' system 'gem install bundler --conservative' system('bundle check') or system('bundle install') puts "\n== Preparing database ==" system 'ruby bin/rake db:setup' system 'RAILS_ENV=test ruby bin/rake db:create' puts "\n== Removing old logs and tempfiles ==" system 'ruby bin/rake log:clear tmp:clear' end
check for all deployment prerequisites before running the # Capistrano deployment task. # We currently check for the following dependencies: # # * Current ruby version. # * The gem dependencies listed in the Gemfile. bundle check &> /dev/null || bundle install --quiet exec bin/cap ${1:-"production"} deploy