Foreman启动导致服务器错误500

时间:2013-11-21 14:41:59

标签: python django heroku gunicorn foreman

我正在按照Heroku教程开始使用Heroku教程来部署我的应用程序。首先在本地进行测试,我开始了工头开始:

| => foreman start
00:47:08 web.1  | started with pid 4465
00:47:09 web.1  | 2013-11-21 00:47:09 [4465] [INFO] Starting gunicorn 18.0
00:47:09 web.1  | 2013-11-21 00:47:09 [4465] [INFO] Listening at: http://0.0.0.0:5000 (4465)
00:47:09 web.1  | 2013-11-21 00:47:09 [4465] [INFO] Using worker: sync
00:47:09 web.1  | 2013-11-21 00:47:09 [4468] [INFO] Booting worker with pid: 4468

然后在Chrome中我转到http://0.0.0.0:5000/rides/(也是http://localhost:5000/rides/),它返回服务器错误500。 我的项目urls.py:

url(r'^rides/', include('rides.urls')),
url(r'^admin/', include(admin.site.urls)),

以下是我的Procfile:

web: gunicorn rides_project.wsgi

requirements.txt:

Django==1.6
South==0.8.3
dj-database-url==0.2.2
dj-static==0.0.5
django-localflavor==1.0
django-toolbelt==0.0.1
gunicorn==18.0
psycopg2==2.5.1
static==0.4
wsgiref==0.1.2

我该如何解决这个问题?提前谢谢你的帮助。

1 个答案:

答案 0 :(得分:1)

您可以成功导航到/ admin吗?如果是这样,我会确保您的DEBUG设置设置为True,以便您可以通过浏览器进行追溯,以帮助确定500错误的根本原因。