0

When I change a javascript file in Rails,and refresh the page,but not change.

why? I even restart the server.but still not work.

this situation caused just when I execute the command:

RAILS_ENV=production bundle exec rake assets:precompile
2
  • look in your public folder if there are assets, if so, delete them Commented Nov 7, 2013 at 8:38
  • I am sure I have deleted the assets folder in public,but not work Commented Nov 7, 2013 at 8:41

1 Answer 1

1

Add this to /config/environment/development.rb and this will work in DEV mode, for production mode you should pre-compile assets and turn off this setting.

So only for DEV mode

  # Don't fallback to assets pipeline if a precompiled asset is missed
  config.assets.compile = true
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.