Error in rails “Permission denied - /tmp/cache/ass

2019-07-13 23:30发布

When I run a rails app and navigate with browser to them I get an error from rails:

Permission denied - /path/to/my_rails_app/tmp/cache/assets/development/sprockets/37b5a12047376b10a57191a10d3af30a rails error

And I have no such file/folders behind the ./tmp/. What is the problem?

2条回答
We Are One
2楼-- · 2019-07-13 23:46

try this:

rm -rf public/assets rake assets:clean RAILS_ENV=development

chown -R nginx:nginx /www/rblpt/

查看更多
不美不萌又怎样
3楼-- · 2019-07-14 00:00

The user who created or 'owns" the my_rails_app directory isn't writable by the server.

chown -R webserveruser:webserveruser /path/to/my_rails_app

Change the webserveruser to http, or apache or whatever username is running your server. The entitiy to the right of the : is the group, use a group name that is writable by your user if you need write access without changing users.

查看更多
登录 后发表回答