0

I've got an application I've been running in development for a long time, and recently switched to running it in production to better test things out. Assets are no longer loading, so the entire look of the application is wrecked.

I see errors like this in console:

cache: [GET /assets/login-b5cc6c1d02b7c2fe3fd9e365a0d6ff82.css] miss
cache: [GET /assets/main-9f54f3726daba54b6104bfa715be64d7.css] miss

If I go ahead and login:

cache: [GET /] miss
---------------------- authorize user -------------------
cache: [GET /assets/login-b5cc6c1d02b7c2fe3fd9e365a0d6ff82.css] miss
---------------------- authorize user -------------------
cache: [GET /assets/main-9f54f3726daba54b6104bfa715be64d7.css] miss
------------ session create --------------
cache: [POST /login] invalidate, pass
---------------------- authorize user -------------------
cache: [GET /dashboard] miss
---------------------- authorize user -------------------
cache: [GET /assets/application-e0afa69f51ff7ce18d7e271410c28b9b.css] miss
---------------------- authorize user -------------------
cache: [GET /assets/application-58091a539ae6d50655f0588d22469022.js] miss
---------------------- authorize user -------------------
cache: [GET /assets/calendar/calendar_icon-cdfb05f267f65ad534496ca12ef7625d.png] miss
---------------------- authorize user -------------------
cache: [GET /assets/find-5cf3fb7806da54cfe899a8948601fac3.png] miss

If I 'ls' public/assets, all these files with the correct fingerprint are there. I've deleted the directory, recompiled assets, deleted the tmp/cache directory, and these all still show up as misses in console and 404 in web console.

ALSO: Initially the app was written with Rails 3.1.0, I've tried on 3.1.2, 3.1.3, and 3.2.1 and the issues persist through all versions.

Let me know what information I can provide to assist. Thank you for your thoughts!

user229044
  • 232,980
  • 40
  • 330
  • 338
YuKagi
  • 2,451
  • 3
  • 21
  • 26

1 Answers1

0

You may need to compile the assets in production: <app root>/rake assets:precompile or bundle exec if you need that.

Here is a post I found useful when I ran into this issue.

ScottJShea
  • 7,041
  • 11
  • 44
  • 67
  • The assets are all precompiled. If I 'ls' the directory, that file is plainly accessible. Thanks for the thought! – YuKagi Feb 24 '12 at 15:29
  • @YuKagi Darn, I was hoping that was it. Let me know if you want me to delete my answer so it does not hurt your accept % – ScottJShea Feb 24 '12 at 15:45
  • Not at all. It isn't the answer to my problem, but it might be for someone else. ;) Thanks again! – YuKagi Feb 24 '12 at 18:51
  • Did you ever get to work this out? I've got exactly the same issue. The files are plainly there in public/assets, but the server not picking them up. – stephenr Apr 12 '12 at 17:39