2 # Copyright (C) The Arvados Authors. All rights reserved.
4 # SPDX-License-Identifier: AGPL-3.0
10 # path to your application root.
11 APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
14 system(*args) || abort("\n== Command #{args} failed ==")
18 # This script is a starting point to setup your application.
19 # Add necessary setup steps to this file.
21 puts '== Installing dependencies =='
22 system! 'gem install bundler --conservative'
23 system('bundle check') || system!('bundle install')
25 # puts "\n== Copying sample files =="
26 # unless File.exist?('config/database.yml')
27 # cp 'config/database.yml.sample', 'config/database.yml'
30 puts "\n== Preparing database =="
31 system! 'bin/rails db:setup'
33 puts "\n== Removing old logs and tempfiles =="
34 system! 'bin/rails log:clear tmp:clear'
36 puts "\n== Restarting application server =="
37 system! 'bin/rails restart'