I am trying to run a simple Rails application on Heroku with some background tasks.

The application is deployed to Heroku, so I run it with Foreman locally so that things are similar to how it would work in production.

However, I cannot get Resque to start and stay up. It shuts down everytime, even without any tasks submitted.

This is how things are setup.

**Gemfile (based on the github page for resque)**

```
gem "resque", "~> 2.0.0.pre.1", github: "resque/resque"

```

**Procfile**

```
web: bundle exec rails server -e $RAILS_ENV -p $PORT
resque: bundle exec rake environment resque:work

```

When I run 'foreman start -e config/dev.env' everything starts booting up, but then Resque SIGTERMS. Here are the logs:

```
16:26:56 resque.1 | Loading Rails environment for Resque
16:26:56 resque.1 | D, [2014-03-12T16:26:56.237941 #22530] DEBUG -- : resque-2.0.0.pre.1: Starting
16:26:56 resque.1 | exited with code 0
16:26:56 system   | sending SIGTERM to all processes
SIGTERM received
16:26:56 web.1    | [2014-03-12 16:26:56] FATAL SignalException: SIGTERM

```

You can see Resque booting up, then shutting down and shutting down the webserver. If I comment out 'resque' in the Procfile, the webserver boots up fine.

Any idea how to set all of this up?