ruby - sidekiq 不是以 bundle exec 开头

标签 ruby 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

最佳答案

当前目录必须是 Rails 应用程序,或者您需要使用 -r 加载您的 Ruby 脚本,以便它可以正确配置 Sidekiq。

bundle exec sidekiq -r ./script.rb

关于ruby - sidekiq 不是以 bundle exec 开头,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33765982/

相关文章:

ruby - 如何在 Windows 7 上安装 ruby​​ gem

mysql - Ruby 1.9.3 上的 Rails 2.3 编码错误

ruby-on-rails -\1(反斜杠 1)在 Ruby 字符串中的作用是什么?

ruby-on-rails - 每个 sidekiq worker 有多种方法

ruby-on-rails - sidekiq 重试参数耗尽

ruby - 运行 ruby​​w 或使用 ocra 构建的 exe 时弹出 Cmd

ruby-on-rails - 使用前端服务器和不同机器上的音频文件在 LAN 上运行 Ruby on rails 应用程序的流式音频?

ruby-on-rails - 我如何调试发送的 TERM 信号?

ruby-on-rails - 使用 sidekiq 处理两个单独的 redis 实例?

ruby-on-rails - rails : How to stop background job of daemonized sidekiq in Ubuntu