rails, Cannot run sidekiq

1.1k views Asked by At

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

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

1

There are 1 answers

0
Mike Perham On BEST ANSWER

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