问题
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?
回答1:
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.
回答2:
try this:
rm -rf public/assets rake assets:clean RAILS_ENV=development
chown -R nginx:nginx /www/rblpt/
来源:https://stackoverflow.com/questions/19364940/error-in-rails-permission-denied-tmp-cache-assets-development-sprockets