title: How do we run some OS command when Rails is starting?
body: <p>I need to run a command after or before starting Rails. It will start a server on port 9292 so my chat app will work.</p>
  
  <p>This command should preferably be executed automatically with Rails (on production and development).</p>
  
  <p>How do we do that in Rails 4?</p>
  
  <p>Is Capistrano the only option? Can we schedule it to be executed when Rails starts?</p>