HXH
HXH

Reputation: 1663

Rails page not change when javascript file changed

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

Upvotes: 0

Views: 49

Answers (1)

Haris Krajina
Haris Krajina

Reputation: 15286

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

Upvotes: 1

Related Questions