1
レール付きのドッカーイメージ(cronがインストール済み)を実行しています。私はコマンドとして動作するcronジョブを追加しようとしている以外はすべて正常に動作していますが、crontabに追加するとエラーが表示されます。コマンドはbashでは動作しますが、cronでは動作しません
次のコマンドは次のとおりです。
0,2 * * * * /bin/bash -l -c 'cd /app && bin/rails runner -e production '\''Statistic.create_statistic'\'' >> log/cron_log.log 2>> log/cron_error_log.log'
私はそれは私が、明確にするために、このスニペットでは省略2分ごとに、実行しました。
私だけ実行します。
/bin/bash -l -c 'cd /app && bin/rails runner -e production '\''Statistic.create_statistic'\'' >> log/cron_log.log 2>> log/cron_error_log.log'
をそれは私が取得
誤りがある作品:
/usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- bundler/setup (LoadError)
from /usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /app/config/boot.rb:3:in `<top (required)>'
from bin/rails:7:in `require_relative'
from bin/rails:7:in `<main>'
私はその仕事をやっているように見えるたび宝石を、使用しています正しく私は間違って何をしていますか?