Trinculo
Trinculo

Reputation: 2021

Rails 4 - cannot change CSS without rake assets:precompile which breaks Javascript?

If I make a change to application.css.scss, no changes are reflected unless I do rake assets:precompile. However, when I run that, none of the JavaScript in my application works. At that point, I have no way of getting the JavaScript to work unless I re-clone the application from GitHub (which wipes out my CSS changes of course). This is all on a local development environment. Any ideas as to why?

Upvotes: 2

Views: 513

Answers (1)

Leo Correa
Leo Correa

Reputation: 19789

Running in development environment should not use precompiled assets unless you've previously precompiled them.

Clean them up with rake assets:clobber and it should pick up your assets as opposed to the precompiled ones.

Upvotes: 3

Related Questions