Search code examples
ruby-on-railssidekiq

sidekiq config does not load and gives an error


I am using Ruby on Rails.

I am trying to get Sidekiq to work with Redis and receive the following error whenever I am starting sidekiq.

    #config/sidekiq.yml
    #Config file for Sidekiq  
    :concurreny: 5
    :queues:
      -[mailer,5]
      -[default,5]

When I run the following command:

bundle exec sidekiq -C config/sidekiq.yml

I get the error as follows:

undefined method `each' for "-[mailer,5] -[default,5]":String

Not sure what the error message says and how to fix it to get Sidekiq to load the configuration and start successfully. Thanks in advance for your answers and help.


Solution

  • YML requires exact formatting. You are missing a space after the dashes.

    https://github.com/mperham/sidekiq/blob/master/examples/config.yml#L16