简体   繁体   中英

Javascript is not loading on server, it is working well at localhost

I used it in application.js

 //= require_tree .

working well at localhost, but .js file isn't loading at server as a website. Can any1 tell whats the problem?

Use "rake assets:precompile" before commit your code in development mode which make the js file to load at server. Be careful of environment development and production. While committing use production and while coding use development mode.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM