简体   繁体   中英

heroku its calling javascript code that its not in my project of ruby on rails

as the tittle said i have a lot of javascript that its not in the project, i have in the project before but now i dont use them anymore so i stop calling them in the application.js and in my test heroku server it works but in my main server its not! and i dont know why.

test server: morning-shelf-6185.herokuapp.com.
run server: www.apptrendit.com.

if you compare the 2 application.js the code are a lot different.

test server: https://morning-shelf-6185.herokuapp.com/assets/application-5c4208e2bfaa870785d03c0aa2febd5c.js
run server: https://morning-shelf-6185.herokuapp.com/assets/application-5c4208e2bfaa870785d03c0aa2febd5c.js

i use heroku for the both of them but 1 of them is a development server and the other is a master server but the 2 of them have the same code and files when i see it with my sublime text

Your problem is probably related to the assets pipeline.

You may want to run RAILS_ENV=production rake assets:precompile before deploying to your main server. If you use capistrano you can automate the process.

Everytime u make a huge change on your assets do this:

bundle exec rake assets:precompile

in local and then just add, commit and push it.

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