Automate running sidekiq while running rails configuration?

I have 2 Run/Debug Configurations setup:

1. Rails Development
2. Gem Command Sidekiq

I'd like to automate starting up sidekiq when running the rails development configuration.  However, since sidekiq is not a daemon, it will block the Rails development configuration until the sidekiq worker is killed if added as a "before launch" item.

Is there a way to automate running sidekiq while running a rails development configuration?

1
5 comments

Hello James,

No, there's no way to automate it via RubyMine but you're welcome to create a corresponding feature request on our tracker specifying how you'd like to see it implemented:

https://youtrack.jetbrains.com/issues/RUBY

You can also try adding several Run configurations to 'Before launch' section.

1

Hello James,

No, there's no way to automate it via RubyMine but you're welcome to create a corresponding feature request on our tracker specifying how you'd like to see it implemented:

myccpay

You can also try adding several Run configurations to 'Before launch' section.

Thank you for the Help, I will try to figure it out for more.

0

Hey James,

What I've done is use foreman to run several processes at once. Install the gem, and then create a "Procfile.dev" file which contains the processes you want to run. Mine has the following:

web: bin/rails s -p 3005
worker: bundle exec sidekiq
js: yarn build --watch
css: yarn build:css --watch

Then, create a gem command for "foreman", and put 

start -f Procfile.dev

in the Arguments section.

 

 

 

1

Thanks Jordan, that's a good workaround for now.

Ideally each process would have it's own terminal in the run/debug portion

0

Please sign in to leave a comment.