2015-11-17 56 views
1

我試圖啓動sidekiq和正在使用:從目錄sidekiq沒有開始捆綁高管

bundle exec sidekiq 

我的劇本和Gemfile中的位置。 這就是我得到:

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 

回答

3

當前目錄必須是一個Rails應用程序,或者需要使用-r加載你的Ruby腳本,因此它可以正確地配置Sidekiq。

bundle exec sidekiq -r ./script.rb