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

Failed to write cache file #169

Closed
Nelrann opened this issue Nov 6, 2016 · 8 comments
Closed

Failed to write cache file #169

Nelrann opened this issue Nov 6, 2016 · 8 comments
Labels

Comments

@Nelrann
Copy link

Nelrann commented Nov 6, 2016

Hi

I installed api platform but now when I want to access the dev environment (app_dev.php) I get an error related to the cache

RuntimeException in ClassCollectionLoader.php line 272: Failed to write cache file "/app/var/cache/dev/classes.php".

thx for help

@Nelrann Nelrann mentioned this issue Nov 6, 2016
@Simperfit
Copy link
Contributor

Can you please show me the rights of your app ?

@Nelrann
Copy link
Author

Nelrann commented Nov 6, 2016

the rights of cache directory
drwxr-xr-x 4 root root /api-platform/var/cache

@Simperfit
Copy link
Contributor

This is on the host right ? Why is it root ?

@Nelrann
Copy link
Author

Nelrann commented Nov 6, 2016

I think it puts the root because when I want to run a command I do this

sudo docker-compose run web bin/console cache:clear

@dunglas
Copy link
Member

dunglas commented Nov 6, 2016

you shouldn't be running docker-compose as root.

@Nelrann
Copy link
Author

Nelrann commented Nov 6, 2016

ok but when i dont use root i have this error

ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

@Simperfit
Copy link
Contributor

What environment are you using ?

Could you please tell me if you run all :

On Linux

  1. Run install script
curl -fsSL https://get.docker.com/ | sh
  1. Add the current in user in the Docker group and restart your machine
sudo usermod -aG docker `whoami`

You have to reboot

  1. Start your docker service
sudo service docker start
  1. Run docker test
docker run hello-world

@Nelrann
Copy link
Author

Nelrann commented Nov 6, 2016

I forgot to reboot my bad

thx

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

No branches or pull requests

4 participants