Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staticfiles on Heroku #673

Open
sidkoul opened this issue Sep 21, 2017 · 1 comment
Open

Staticfiles on Heroku #673

sidkoul opened this issue Sep 21, 2017 · 1 comment
Assignees

Comments

@sidkoul
Copy link
Member

sidkoul commented Sep 21, 2017

Deploying to Heroku fails due to collectstatic stack dumping. Research how to configure STATIC_ROOT for production on Heroku.

https://devcenter.heroku.com/articles/django-app-configuration#static-assets-and-file-serving

$ python gobotany/manage.py collectstatic --noinput        
 Traceback (most recent call last):        
   File "gobotany/manage.py", line 10, in <module>        
...
  File "/app/.heroku/python/lib/python2.7/site-packages/django/contrib
      /staticfiles/storage.py", line 49, in path        
  raise ImproperlyConfigured("You're using the staticfiles app "        
  django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having 
  set the STATIC_ROOT setting to a filesystem path.
   Error while running '$ python gobotany/manage.py collectstatic --noinput'.
 See traceback above for details.
 You may need to update application code to resolve this error.
 Or, you can disable collectstatic for this application:

   $ heroku config:set DISABLE_COLLECTSTATIC=1

 https://devcenter.heroku.com/articles/django-assets
 Push rejected, failed to compile Python app.

! Push failed
@sidkoul sidkoul self-assigned this Sep 21, 2017
jnga added a commit that referenced this issue Jan 24, 2018
This is to try and debug why the Dev server no longer
could find any static files (say, CSS) after the last
deployment.
jnga added a commit that referenced this issue Jan 24, 2018
The issue shows a message that talks about not setting
STATIC_ROOT to a filesystem directory, and how that is
the cause of a problem. The current configuration appears,
by setting its path to an empty string, to have /static/
appear at the root of the app directory. So, this change
attempts to keep that as it is, but express it differently
by specifying the current directory instead.
jnga added a commit that referenced this issue Jan 24, 2018
…g to Dev. (see #673)

The bug was an error message, apparently triggered by
the bump of the Python runtime clearing things out and
reinstalling. Bug:
psycopg/psycopg2#489
@jnga
Copy link
Contributor

jnga commented Jan 24, 2018

The changes associated with this issue today were an attempt to debug a problem in Dev, now opened as Issue #681. It apparently does not to have to do with static files. The changes are minor but will be included in Release 2.8 (likely in 2.8.2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants