I would like my Rails development environment to automatically start redis and resque (and possibly in other projects, mongod, mysql-server, etc.) for me, in the following cases:
- When starting the development server
rails server
.
In addition, it would be nice if, in the following cases, services that were already running were detected, and if they did not start, too:
- Rake rspec, rspec / spec when running tests.
- At startup
rails console
.
When shutting down, rails server
running child services must also be disabled.
What is the right place for such additional startup scripts?
And how to avoid starting them in production, too (where I run everything through the services / etc / init.d)?
source
share