Is there any way to update the javascript when I reload the page using rails?

You don’t need to precompile your assets in development environment. Remove config.assets.compile = false from config/environments/development.rb if it’s there. Read this stackoverflow question for a better idea of what happens.