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
rails3.1 rc5 and images problem - 200 OK but they don't show (css and js works fine) #2299
Comments
I'm also seeing this issue. 200 or 304 on the images in question. Rails 3.1 rc5, REE1.8.7, Passenger 3.0.7. |
I think the problem is with sprockets 2 beta 12. I'm getting the same issue with rails3.1rc4 and sprockets2 beta12 but using sprockets2 beta10 it works fine. I tried do use rails3.1rc5 with sprockets2 beta 10 but there'r dependency issues. |
Tried fetching an asset using curl, content-length is reported as zero. |
Is this not related to #1822 ? |
It's similar issue but as I said I've got problem with sprockets2 beta12. #1822 got problem with beta10 (it's working fine with beta10 for me).
Again - after downgrade to rc4 and force sprockets beta10 it's working fine. |
@zlw which http server are you using? |
unicorn + apache2 |
@zlw can you check setting x_sendfile_header to nil ? |
Having the same issue. Just upgraded to rc5 from rc4 and sprockets from beta.10 to beta.12 Edit: By the way, x_sendfile_header = nil doesn't solve the issue |
Not sure if tit's the same issu: Just upgraded to RC5 and now in production the checksums generated by the asset_path is wrong, so the precompiled files are not found. Will try downgrading sprockets to beta10 as suggested. |
Can't downgrade as rails rc5 depends on sprockets beta12 |
Rolled back to rc4 until this issue is solved... |
I do not see this issue in production with rails from the git branch 3-1-stable hosted on heroku and running unicorn. |
@dmathieu On which sprockets version depends 3-1-stable branch? I still think that it's sprockets issue. |
same issue here: 3.1.0rc5, apache with passenger. |
didn't solve it with 3.1.0rc4 and sprockets 2.0.0.beta.10 either :/ |
are you sure that you forced 2beta10? gem "sprockets", "2.0.0.beta.10" try to remove all versions of sprockets from your system. |
Yes:
I completely removed 2.0.0.beta.12, too. |
I have same problem on my env(MRI1.9.2, Rails3.1.0.rc5, Sprockets2.0.0.beta.12 and WEBrick/Thin/Unicorn) with Some logs from Server logs:
HTML output: <img alt="Logo" src="/assets/logo-ae8cd48a01131edfe93d47bdccd36fd7.png" />
2011-08-01 14:41:24 igasgeek ttys002
HTTP/1.1 200 OK
Content-Type: image/png
Content-Length: 0
Cache-Control: public, max-age=31536000
Last-Modified: Sat, 30 Jul 2011 18:50:59 GMT
Etag: "ae8cd48a01131edfe93d47bdccd36fd7"
X-Ua-Compatible: IE=Edge,chrome=1
X-Sendfile: /Volumes/HDD/Code/dadaday/app/assets/images/logo.png
X-Runtime: 0.002316
Date: Mon, 01 Aug 2011 10:04:31 GMT
X-Content-Digest: da39a3ee5e6b4b0d3255bfef95601890afd80709
Age: 3501
X-Rack-Cache: fresh
Server: WEBrick/1.3.1 (Ruby/1.9.2/2011-07-09)
Connection: Keep-Alive |
I have same issue
|
I have same issue without sprockets :( |
Same issue. 3.1.0rc5, apache with passenger. CSS and JS work fine. |
Same issue when using 3.1.0rc5, Thin and nginx. CSS and JS work, images do not. |
markmcb, abhid, did you manage to make it work with sprockets 2.0beta10 and rails 3.1rc4? |
@koichirose, I got it working now. I added 2.0.0.beta.10 to my Gemfile, did a bundle update, restarted the app. That didn't immediately solve the problem. However, running |
Getting the same problem on Heroku production. CSS and JS files are working fine. But images are not seen. On local dev, everything works fine. Running on Thin. |
The problem seems to go away if you change, in production.rb:
from
This works in Heroku at least, since they are using nginx. I can now see asset images accordingly. |
But X-Accel-Redirect is for nginx (relying on documentation). What about apache? |
Perhaps RC6 will come up with a fix for Apache |
Still broken, and now I can't even revert to rc4, and sprockets-2.0.0.beta.10. "Could not find sprockets-2.0.0.beta.10 in any of the sources" |
I managed to solve it, with rc4 and beta10, after running the rake task. |
Some of these problems are due to people not understanding how their assets 1. Asset is in public folder
|
Things are working for me with current 3-1-stable and sprockets master, possibly after I made config.action_dispatch.x_sendfile_header default to nil. I'm going to close this issue until someone is able to provide a steps which shows new issues :). |
Things are working for me with current 3-1-stable and sprockets master, possibly after I made config.action_dispatch.x_sendfile_header default to nil. I'm going to close this issue until someone is able to provide a steps which shows new issues :). |
I still can't solve this. Here's the repository: https://github.com/koichirose/tvshows All the images return 304 not modified: |
@ koichirose You have to update your config/application.rb and config/environments/* files. |
@spastorino: how? I just tried (see commit at https://github.com/koichirose/tvshows ): I copied them from a newly created Rails 3.1 app. Didn't solve it. |
@koichirose can you reset your browser cache and delete all the files in tmp/cache? |
yeah, it was tmp/cache. |
@guilleiguaran remove tmp/cache and worked, thank you so much! |
I'm still having problem with this. I updated to Rails 3.1 stable (from Rails 3.1 rc4), removed tmp/cache and public/assets, tryin x_sendfile_header. |
@zlw did you install the xsendfile module for apache? (Debian: libapache2-mod-xsendfile) Did you activate it for your rails project? |
@jakobsack nope, i'll try that. What do you mean 'activate it for rails project'? |
@zlw xsendfile is off by default, you have to enable it. For example set
in the apache config for your rails app. See the module documentation for more details. |
Ok, that was problem with apache configuration. For xsendfile mod > 0.10 we need to add: |
I've got problem with images after upgrade (from rc4 to rc5). They just don't show in the browser. There's no 404 when I go to the url /asset/image_name.jpg, not 404 in logs.
log fragment: http://pastie.org/2279109
The text was updated successfully, but these errors were encountered: