Commit 8e6928205b19648855a2d1e8665a61ca698485f0

Authored by Lucas Kanashiro
1 parent 1d8c9a75

Added 'bundle exec' in script/production

Where have some gem dependency was added 'bundle exec' in call
Showing 1 changed file with 9 additions and 9 deletions   Show diff stats
script/production
... ... @@ -26,11 +26,11 @@ clear_cache() {
26 26 }
27 27  
28 28 do_start() {
29   - rake db:migrate SCHEMA=/dev/null
  29 + bundle exec rake db:migrate SCHEMA=/dev/null
30 30 clear_cache
31 31 environments_loop start
32   - whenever --write-crontab --set 'environment=production'
33   - ruby -S thin -C config/thin.yml start
  32 + bundle exec whenever --write-crontab --set 'environment=production'
  33 + ruby -S bundle exec thin -C config/thin.yml start
34 34 }
35 35  
36 36 do_stop() {
... ... @@ -39,23 +39,23 @@ do_stop() {
39 39 # back to stopping the daemons by manually reading their PID files, killing
40 40 # them and wiping the PID files.
41 41  
42   - ruby -S thin -C config/thin.yml stop ||
  42 + ruby -S bundle exec thin -C config/thin.yml stop ||
43 43 stop_via_pid_file tmp/pids/thin.*.pid
44 44  
45 45 environments_loop stop ||
46 46 stop_via_pid_file tmp/pids/delayed_job.pid tmp/pids/delayed_job.*.pid tmp/pids/feed-updater.*.pid
47 47  
48   - whenever --clear-crontab
  48 + bundle exec whenever --clear-crontab
49 49 }
50 50  
51 51 do_restart() {
52   - rake db:migrate SCHEMA=/dev/null
  52 + bundle exec rake db:migrate SCHEMA=/dev/null
53 53 environments_loop stop ||
54 54 stop_via_pid_file tmp/pids/delayed_job.pid tmp/pids/delayed_job.*.pid tmp/pids/feed-updater.*.pid
55 55 environments_loop start
56 56  
57 57 clear_cache
58   - ruby -S thin -C config/thin.yml restart --onebyone
  58 + ruby -S bundle exec thin -C config/thin.yml restart --onebyone
59 59 }
60 60  
61 61 stop_via_pid_file() {
... ... @@ -76,11 +76,11 @@ environments_loop() {
76 76 for environment in $environments; do
77 77 env=$(basename $environment | cut -d. -f1)
78 78 RAILS_ENV=$env ./script/delayed_job -i $env "$action"
79   - RAILS_ENV=$env ./script/feed-updater "$action" -i $env
  79 + RAILS_ENV=$env bundle exec ./script/feed-updater "$action" -i $env
80 80 done
81 81 else
82 82 ./script/delayed_job "$action"
83   - ./script/feed-updater "$action"
  83 + bundle exec ./script/feed-updater "$action"
84 84 fi
85 85 }
86 86  
... ...