How to start multiple rails projects just by one command

If you do serious Rails programming, you may have multiple projects for your application. For example you may have one project for an API and another for a web UI. You might also use some background processing like sidekiq etc. Every time you need to launch these services on a development environment, you have to launch all projects in separate consoles manually.

Fortunately there is a better way to do it. By using a gem ‘subcontractor’ together with ‘foreman’ gem, you can define all the projects and services that you want to launch in the ‘Procfile’, for example:

Then you can launch all the projects and services just by one command:

foreman start