Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Asset pipeline looks in wrong directory

I added this line in my layout file:

<%= stylesheet_link_tag "bootstrap", "bootstrap-responsive", :cache => true%>

Which produces this error message:

Errno::ENOENT in Test#index

No such file or directory - Asset file not found at '/Developer/Workspace/MyProj/public/stylesheets/Developer/Workspace/MyProj/app/assets/stylesheets/bootstrap.css'

It appears to have concatenated the path to the folder twice before looking for the file. Is this a known issue with rails 3.2.3? Or is there some setting I mucked up?


1 Answers

try removing ":cache => true"

If you take a look at https://github.com/rails/rails/pull/6752/files#L0R40 you will see the line, which produces wrong path when cache or concat options are enabled. In this case paths will looks like "/Absolute/path/to/public/" + "/Absolute/path/to/asset/file.ext" which is wrong.

-- Rails pull request that seems to be related to your issue.

like image 124
blamattina Avatar answered Jan 29 '26 04:01

blamattina



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!