fixes for failed cron maintenance tasks

* update rails scripts for 5.2
* system dmails should be scoped to system
* fix broken url generator in forum notices
This commit is contained in:
Albert Yi
2018-04-27 14:44:43 -07:00
parent 907881aced
commit 664a3f02e2
16 changed files with 139 additions and 46 deletions

View File

@@ -1,10 +1,9 @@
#!/usr/bin/env ruby
require 'pathname'
require 'fileutils'
include FileUtils
# path to your application root.
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
APP_ROOT = File.expand_path('..', __dir__)
def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
@@ -18,6 +17,9 @@ chdir APP_ROOT do
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')
# Install JavaScript dependencies if using Yarn
# system('bin/yarn')
puts "\n== Updating database =="
system! 'bin/rails db:migrate'