简体   繁体   English

javascript覆盖无法在生产环境中使用

[英]javascript overriding not working in production

in my app i want to override a js file which is already available in gem . 在我的应用程序中,我要覆盖gem中已经可用的js文件。 now problem is im able to override it in development and its working properly also 现在问题无法在开发中覆盖它并且它也可以正常工作

but in production its calling js file from gem not from my app my app 但是在生产中,它从gem调用的js文件不是从我的应用程序是我的应用程序

if (city!='' && state!='') {
    $('#Location').val(city+', '+state).removeClass('defaultTextActive');
}

gem 宝石

if (city!='' && state!=''&& pin!='') {
    $('#Location').val(city+', '+state+','+pin).removeClass('defaultTextActive');
}

try this out 试试这个

clear all your precompiled assets, and regenerate them with following rake tasks. 清除所有预编译的资产,并通过以下rake任务重新生成它们。

  rake assets:clean
  rake assets:precompile RAILS_ENV=production

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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