简体   繁体   中英

rails, Cannot run sidekiq

I have created sidekiq.yml file inside config folder:

---
:concurrency: 25
:pidfile: ./tmp/pids/sidekiq.pid
:logfile: ./log/sidekiq.log
:queues:
  -default

I have added foreman gem in my Rails project and created Procfile in my root folder:

web: bundle exec rails s
worker: sidekiq -C config/sidekiq.yml

When I run foreman in my command line it just does not want to start. Messages are:

C:\Users\lenovo\RubymineProjects\new-seeker-test>foreman start
11:41:39 web.1    | started with pid 8088
11:41:39 worker.1 | started with pid 7920
11:41:40 web.1    | DL is deprecated, please use Fiddle
11:41:40 worker.1 | undefined method `each' for "-default":String
11:41:40 worker.1 | D:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sidekiq-   3.3.4/lib/sidekiq/cli.rb:378:in `parse_queues'
11:41:40 worker.1 | D:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sidekiq-  3.3.4/lib/sidekiq/cli.rb:363:in `parse_config'
11:41:40 worker.1 | D:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sidekiq-3.3.4/lib/sidekiq/cli.rb:212:in `setup_options'
11:41:40 worker.1 | D:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sidekiq-3.3.4/lib/sidekiq/cli.rb:38:in `parse'
11:41:40 worker.1 | D:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sidekiq-3.3.4/bin/sidekiq:7:in `<top (required)>'
11:41:40 worker.1 | D:/Ruby21-x64/bin/sidekiq:23:in `load'
11:41:40 worker.1 | D:/Ruby21-x64/bin/sidekiq:23:in `<main>'
11:41:40 worker.1 | exited with code 1
11:41:40 system   | sending SIGKILL to all processes
11:41:40 system   | sending SIGKILL to web.1 at pid 8088
11:41:40 web.1    | exited with code 0

I think there is something on 11:41:40 worker.1 | undefined method 'each' for "-default":String 11:41:40 worker.1 | undefined method 'each' for "-default":String

My ruby version is 2.1.5 Rails version is 4.2.0 Windows 7 x64

The queues list in your YAML file is invalid. You need a space after the dash.

https://github.com/mperham/sidekiq/wiki/Advanced-Options#the-sidekiq-configuration-file

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM