Starting Sidekiq with rails server in development environment

AnkitG picture AnkitG · Oct 9, 2012 · Viewed 11.9k times · Source

I am using Sidekiq for some of my background processes.

Currently what I do is:

start bundle exec rails s on one terminal and then start bundle exec sidekiq on a different terminal so that the sidekiq starts itself and look for jobs to process.

What I want is:

As soon as i start bundle exec rails s it should also start the sidekiq bundle exec sidekiq. How can i integrate it in just Development environment ??

Answer

Jonah picture Jonah · Oct 9, 2012

For apps like yours which require a number of services to be running consider using foreman and a Procfile to define those processes. Then you can use foreman start to run all of them in a single terminal.