0

After changing my Rails app from version 4.2.0 to 5.0.2, I can no longer make changes to assets in my rails development environment.

I looked at Rails dev environment not updating html/css/assets even after restarting server and emptied my public/assets folder. After emptying that (& after restarting my server and emptying my browser cache and precompiling assets again), I still had the same problem.

I then tried $ rake assets:precompile RAILS_ENV=development, which "sort of" solved my problem -- but I have to do this and restart the server every time!

I had not made any changes to development.rb before this problem began.

I did RAILS_ENV=development bundle exec rake assets:clean, RAILS_ENV=development bundle exec rake assets:precompile, and RAILS_ENV=development bundle exec rails server and I cleared my browser cache, but my assets still won't change in the development environment. I still have to shut off my server and to do rake assets:precompile RAILS_ENV=development for every change I make.

If anyone has any idea how to solve this problem, I'd much appreciate it.

EDIT: Actually, when looking at Rails dev environment not updating html/css/assets even after restarting server again, in Chris Heald's answer he advised removing the entire public/assets folder (not just its contents). I did that (& and also made a public/assets_hide folder per Max Dunn's advice) and it worked! I'm back in business.

Community
  • 1
  • 1
Matt
  • 811
  • 2
  • 11
  • 20

0 Answers0