0

I just deployed Askbot forum to heroku successfully, but sometimes when running 'git push heroku master', the automatic collectstatic process fails (to me it looks like a random failure), prompting:

-----> Python app detected

-----> Installing dependencies with pip
   Cleaning up...

-----> Preparing static assets
   Collectstatic configuration error. To debug, run:
   $ heroku run python ./askbot/setup_templates/manage.py collectstatic --noinput`

Well I don't really know if that's the problem, but the manage.py in .askbot/setup_templates/ contains the app's native version of the file, not the one I'm using for deployment, which is located in the app's root.

How could I make git push heroku master use the right manage.py file?

Andreu C.
  • 177
  • 1
  • 2
  • 10

2 Answers2

0

Change the path in your Procfile. Typically its something like this:

web: gunicorn hellodjango.wsgi --log-file -

Adjust it:

# from:
web: gunicorn .askbot/setup_templates/yourApp.wsgi

# to: 
web: gunicorn .askbot/yourApp.wsgi

to check if the path was indeed your problem run this from the terminal:

heroku run python ./manage.py collectstatic

# or 

heroku run python ./yourApp.wsgi collectstatic
agconti
  • 17,780
  • 15
  • 80
  • 114
  • Procfile is executed after the manage.py collectstatic command I was talking about, My priority was to fix that call. Thanks anyway – Andreu C. Aug 07 '14 at 16:14
0

Deleting or renaming Manage.py in askbot/setup_templates/ solved the problem.

Git Push Heroku Master never fails whan running collectstatic ever after.

so I believe that for some reason, probably because of sys.path configuration sometimes Git Push Heroku Master first discovered and used ./askbot/setup_templates/manage.py instead of ./manage.py (which was the right one), and encountered an ImportError.

Andreu C.
  • 177
  • 1
  • 2
  • 10