Reputation: 5174
Sometimes I update my Coffee code in Rails 3.1 and it doesn't detect any of the changes, ie. I refresh my browser/cache and it still invokes the old script. Anyone know what causes this?
EDIT: I even litter my entire scripts with "debugger" and none of them ever gets called. Any idea why it simply won't refresh the Coffeescripts?
EDIT2: I realize that it doesn't even detect javascript changes sometimes. Am I missing something? Note I am not bouncing my server when I change JS files... It used to work...
Upvotes: 5
Views: 3783
Reputation: 5174
For the curious, it suddenly started functioning correctly again by itself. I have reason to believe it was actually the Daylight Savings Time that caused this bug. Not sure if this could be the case but it suspiciously started working again naturally after a fixed amount of time (about 1 hour).
Upvotes: 2
Reputation: 2648
For the development
environment you could try to rake assets:clean
. Rails sometimes reads the precompiled assets in development environment, so this will clean them and the fresh ones will be loaded.
For the production
environment try to rake assets:precompile
, so that the changes are compiled and stored in the assets files.
Upvotes: 6