RĂ©gis Millet
2011-Nov-18 15:24 UTC
Assets - find a weird behavior recently and I''d like to understand the original issue
Hi the great community of Rails :) Okay... Recently I had a big problem with javascript (JQuery) in one of my Rails 3.1 application. The problem was that the behavior of my javascript animations were acting in a very weird way, and the strangest thing was it happened only in development for the exact same code as the one of the production application. What I tried: (if you''re in a hurry, just skip this part) So I first thought it was because of an update in my development environment, so I reproduced the exact same environment (gems included) than the one I had in production. Problem was still there. Then I thought the problem came from JQuery, that, somehow, my development application was using the last JQuery version. So I read carefully the released notes of the last version and updated my Javascript code. That fixed some weird animations but not all of them... So... as I was trying to fix my code, I noticed that it wasn''t updating all the code (just some parts) of my running application... I even deleted one "carousel.js" file from my assets/javascripts folder, but... the carousel was still there (and it shouldn''t) and the strange animations were still there too... What finally solved the problem: (this is the important part) Then... I decided to delete all the precompiled assets from my public folder (cause I did run rake assets:precompile in order to deploy my application). And... It finally fixed all my problems... as if my development application was rendering assets from both app/assets and public/assets folders. What I can''t understand is why? Does anyone have any clue? I didn''t change anything in my environments configurations, they have always been the defaults ones... I''m just curious and I''d like to understand what happened here. So if anyone can help, thanks :) but this is not an "urgent issue" so... Thanks! Kulgar. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.