user502052
user502052

Reputation: 15258

How to run a custom command when run the 'rails server' command?

I am using Ruby on Rails 3.1.0 and the DelayedJob gem. In order to automate processes in development mode I would like to "auto"-run the following command

rake jobs:work

when in my console\terminal I run this other command

rails server

# and/or
#
# rails db:create
# rails db:migrate
# ...

Is it possible? How can I do that?

Upvotes: 0

Views: 407

Answers (1)

thomasfedb
thomasfedb

Reputation: 5983

The gem "foreman" will sort this out for you. Here's the railscast: http://railscasts.com/episodes/281-foreman

Upvotes: 2

Related Questions