From 14e6920f4ce76fd54c8a2a4d70bd334d35c9ec92 Mon Sep 17 00:00:00 2001 From: Henare Degan Date: Tue, 19 Feb 2013 12:32:07 +1100 Subject: Upgrade script script/purge-varnish --- script/purge-varnish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'script/purge-varnish') diff --git a/script/purge-varnish b/script/purge-varnish index 932cf6635..7dcecd4f9 100755 --- a/script/purge-varnish +++ b/script/purge-varnish @@ -4,8 +4,8 @@ LOC=`dirname $0` if [ "$1" == "--loop" ] then - "$LOC/runner" 'PurgeRequest.purge_all_loop' + rails runner 'PurgeRequest.purge_all_loop' else - "$LOC/runner" 'PurgeRequest.purge_all' + rails runner 'PurgeRequest.purge_all' fi -- cgit v1.2.3 From b4346ad162eb153fbe785cf9f6322f3e6305088a Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Wed, 29 May 2013 15:44:04 +0100 Subject: Now that runner is invoked via the rails command and not directly from the script directory, it's more important to cd to the app directory in order to pick up the bundler gemfile. Fixes #964. --- script/purge-varnish | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'script/purge-varnish') diff --git a/script/purge-varnish b/script/purge-varnish index 7dcecd4f9..abc6daeaf 100755 --- a/script/purge-varnish +++ b/script/purge-varnish @@ -1,11 +1,12 @@ #!/bin/bash -LOC=`dirname $0` +TOP_DIR="$(dirname "$BASH_SOURCE")/.." +cd "$TOP_DIR" if [ "$1" == "--loop" ] then - rails runner 'PurgeRequest.purge_all_loop' + bundle exec rails runner 'PurgeRequest.purge_all_loop' else - rails runner 'PurgeRequest.purge_all' + bundle exec rails runner 'PurgeRequest.purge_all' fi -- cgit v1.2.3