Home > Software design >  Css changes are not being applied in rails app
Css changes are not being applied in rails app

Time:11-11

I am working on rails app and now I am having trouble.

Early when I use to change my frontend styling and apply changes in css then they quickly show up on reload in brower.

But in present, don't know but something went wrong. Whenever I change css and save it then onl oad, things remain same. After debugging, I found that app is picking styling files from precompiled assets pipeline. So for the solution, I have to recompile the assets then 2 new files are generated against wach file changed. And there will be 4 files in total against a single css file in which changes are made. So now I have to delete old ones and then have to restart the serve and refreshing the browser will show all the changing and that is weird as I have to do it all the time for every single change. I can't figure as I am new to rails. Help....

CodePudding user response:

If you are developing the app, you should delete public/assets directory. Then restart the app. Don't run asssts:precompile task. Your most recent changes of assets will be up to date without restart the app.

CodePudding user response:

Please clear the tmp cache first and then run the server

$ rake tmp:cache:clear && rails server
  • Related