David R
David R

Reputation: 328

Rails Asset Pipeline / Sprockets

I've switched to using the asset pipeline recently. Everything is working well and I can precompile for production with no problems.

The trouble I'm having is in my development environment I want changes I make to take affect without having to precompile. I couldn't find clear instructions on how to see my latest CSS changes immediately locally. As an example, should I be using something like this in addition to my application.css.scss' @import statements?

//= depends_on reset
//= depends_on typography

@import "reset.css.scss"
@import "typography.css.scss"

Any pointers would be much appreciated.

Upvotes: 2

Views: 337

Answers (1)

Ryan Bigg
Ryan Bigg

Reputation: 107718

Don't run rake assets:precompile locally if you want to see local changes appear. I suspect this is what you're doing, so that's why local changes are not appearing. Clear public/assets and then it will start to serve assets from the right directories, compiling them if they change and then serving.

Upvotes: 5

Related Questions