title: Django project not found Error
body: <p>I'm getting the error: django project not found when I try to run my bash script below, why?</p>
  
  <p>This works: <code>gunicorn wsgi:application -b 127.0.0.1:8003</code></p>
  
  <p>This errors: <code>bash start_gunicorn.sh</code></p>
  
  <p><strong>start_gunicorn.sh:</strong></p>
  
  <pre><code>#!/bin/bash
  
  set -e
  
  LOGFILE=/srv/domain/logs/domain.log
  
  ERRORFILE=/srv/domain/logs/error.log
  
  LOGDIR=$(dirname $LOGFILE)
  
  NUM_WORKERS=3
  
  #The below address:port info will be used later to configure Nginx with Gunicorn
  
  ADDRESS=127.0.0.1:8003
  
  # user/group to run as
  
  #USER=your_unix_user
  
  #GROUP=your_unix_group
  
  cd /srv/domain
  
  test -d $LOGDIR || mkdir -p $LOGDIR
  
  exec gunicorn_django -w $NUM_WORKERS --bind=$ADDRESS \
  
  --log-level=debug \
  
  --log-file=$LOGFILE 2&gt;&gt;$LOGFILE  1&gt;&gt;$ERRORFILE  &amp;
  </code></pre>
  
  <p>Do I need to tell it where the project is? whats the setting for this?</p>
  
  <p><strong>Stack:</strong></p>
  
  <pre><code>  File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/djangoapp.py", line 62, in make_default_env
      raise RuntimeError("django project not found")
  RuntimeError: django project not found
  2014-04-02 10:13:56 [1038] [INFO] Worker exiting (pid: 1038)
  Traceback (most recent call last):
    File "/usr/local/bin/gunicorn_django", line 9, in &lt;module&gt;
      load_entry_point('gunicorn==18.0', 'console_scripts', 'gunicorn_django')()
    File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/djangoapp.py", line 160, in run
      DjangoApplication("%(prog)s [OPTIONS] [SETTINGS_PATH]").run()
    File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 143, in run
      Arbiter(self).run()
    File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 203, in run
      self.halt(reason=inst.reason, exit_status=inst.exit_status)
    File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 298, in halt
      self.stop()
    File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 341, in stop
      self.reap_workers()
    File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 452, in reap_workers
      raise HaltServer(reason, self.WORKER_BOOT_ERROR)
  gunicorn.errors.HaltServer: &lt;HaltServer 'Worker failed to boot.' 3&gt;
  ubuntu@ip-10-37-235-227:/srv/domain$ sudo nano start_gunicorn.sh
  </code></pre>
  
  <p>Project Folder Example: Ubuntu</p>
  
  <pre><code>/srv/domain/manage.py
  /srv/domain/wsgi.py
  /srv/domain/project_folder/
  /srv/domain/project_folder/apps/
  /srv/domain/project_folder/core/
  /srv/domain/project_folder/core/urls.py
  
  etc
  </code></pre>