sidekiq not starting with bundle exec

六眼飞鱼酱① 提交于 2019-12-11 13:02:30

问题


I am trying to start up sidekiq and am using:

bundle exec sidekiq

from the directory my script and gemfile are located. This is what I am getting:

2015-11-17T19:20:48.801Z 78733 TID-owl77getk INFO: ==================================================================
2015-11-17T19:20:48.801Z 78733 TID-owl77getk INFO:   Please point sidekiq to a Rails 3/4 application or a Ruby file  
2015-11-17T19:20:48.801Z 78733 TID-owl77getk INFO:   to load your worker classes with -r [DIR|FILE].
2015-11-17T19:20:48.801Z 78733 TID-owl77getk INFO: ==================================================================
2015-11-17T19:20:48.801Z 78733 TID-owl77getk INFO: sidekiq [options]
-c, --concurrency INT            processor threads to use
-d, --daemon                     Daemonize process
-e, --environment ENV            Application environment
-g, --tag TAG                    Process tag for procline
-i, --index INT                  unique process index on this machine
-q, --queue QUEUE[,WEIGHT]       Queues to process with optional weights
-r, --require [PATH|DIR]         Location of Rails application with workers or file to require
-t, --timeout NUM                Shutdown timeout
-v, --verbose                    Print more verbose output
-C, --config PATH                path to YAML config file
-L, --logfile PATH               path to writable logfile
-P, --pidfile PATH               path to pidfile
-V, --version                    Print version and exit
-h, --help                       Show help

回答1:


The current directory must be a Rails app OR you need to use -r to load your Ruby script so it can configure Sidekiq properly.

bundle exec sidekiq -r ./script.rb


来源:https://stackoverflow.com/questions/33765982/sidekiq-not-starting-with-bundle-exec

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!