[Answered ]-Collectstatic throws 'OSError: [Errno 2] No such file or directory:' on dotcloud

2👍

After getting some sleep, I discovered that my ‘static’ folder was not in the location I specified in my ‘settings.py’ file.

Also, dotCloud has updated their documentation to warn that ‘/static/’ is no longer automatically created as earlier stated so I changed my postinstall script to remove the symlink to ‘/static/’ and also adjusted the nginx.conf file as instructed in the updated documentation.

Reference:
Handlinng static files on dotCloud

0👍

Any error messages like “./postinstall failed with return code” means that there is a problem with your own script, not the platform.

In order to debug postinstall executions easily on dotCloud, you can do the following:

Let’s assume that your app is “ramen” and your service is “www”.

$ dotcloud -A ramen run www
> ~/current/postinstall

It’ll re-execute the postinstall but from your session this time, so you’ll be able to easily update the postinstall code and re-run it without having to push again and again.

Once you found the root cause, fix it locally and repush your application.

Leave a comment