Ruby, Errno::EACCES, Permissions Denied, sprockets

Go To


I'm begging someone to help me… I can't figure to this error… I've looked everywhere… It appears to be a permissions issue. I've done CHMOD -R 777 and CHOWN…

My ignorant guess is that maybe I SUDO set up.. and then later changed… and then maybe the permissions became confused… But maybe it's something completely different...

Errno::EACCES in Pages#home

Showing [PATH]/sample_app/app/views/layouts/_stylesheets.html.erb where line #7 raised:

Permission denied - ([PATH]/sample_app/tmp/cache/assets/sprockets%2F6fad04bfc6f657170023030f3a905cfd20120403-32248-1jrp9lc, [PATH]/sample_app/tmp/cache/assets/D2F/8A0/sprockets%2F6fad04bfc6f657170023030f3a905cfd)
Extracted source (around line #7):

I'm a noob following Ruby on Rail 3 Tutorial, seen here.

I successfully got to this point, all was well.. and even briefly saw my page load correctly before this error stopped me in my tracks.

One other thing — which may help of confuse the issue not sure — in my _stylesheets.html.erb I have this path:

<%= stylesheet_link_tag 'custom', :media => 'screen' %>

If I change the path by adding a slash before "custom", like so:

<%= stylesheet_link_tag '/custom', :media => 'screen' %>

…then the pages display ok.. but just not with that necessary stylesheet.

2012-04-04 02:11
by midlantica
What are the permissions and owner on /tmp? The problems are permissions on the CSS files there. Actually, you could try shutting the app down, deleting the contents of the /tmp directory, then starting up again - Adrian Gray 2012-04-04 02:51
OMG I love you Adrian Gray! Deleted /tmp and POP it's all back! Thank you soo much... Why didn't I think of that? All this time I'd though it was me... Oh wait... it may still have been me right? Thank you Obi wan - midlantica 2012-04-04 12:12
Use Command

sudo chown -R $user:$group /myfolderHarshal Bhamare 2016-11-29 11:14



mv /sample_app/tmp/assets to /sample_app/tmp/assetsbak

And all is OK

2019-01-05 09:20
by cheng zhang
Please elaborate on all is OK - Tobias Wilfert 2019-01-05 09:26
Please don't add "thank you" as an answer. Once you have sufficient reputation, you will be able to vote up questions and answers that you found helpful. - From ReviewLemon Kazi 2019-01-05 15:12
@LemonKazi look closely at the answer next time; just containing "thanks" doesn't necessarily make it a "thank you"-answer. Many people post-fix their posts with "thanks" and similar phrases without necessarily any meaning - Zoe 2019-01-07 21:07