简体   繁体   English

JavaScript插件未加载

[英]Javascript plugins are not loading

I have cloned one rails(3.2.13) project from git repository. 我已经从git仓库克隆了一个rails(3.2.13)项目。 CSS styles are working fine. CSS样式运行良好。 But whole javascript plugins are not loading. 但是整个javascript插件无法加载。

Eg: Bootstrap's dropdown(nav-list) list is not showing, ajax request is not working etc. 例如:Bootstrap的下拉列表(nav-list)列表未显示,ajax请求不起作用等。

I have checked it by precompiling the assets but still it is not working. 我已经通过预编译资产检查了它,但是仍然无法正常工作。 I have checked the same project with others, it is working fine for them. 我已经和其他人检查过同一项目,对他们来说很好。 Please help me to solve this issue. 请帮我解决这个问题。

In application.js, 在application.js中,

 //= require jquery
 //= require jquery_ujs
 //= require twitter/bootstrap
 //= require bootstrap-datepicker
 //= require_tree .

In jquery console, i am getting below errors, 在jquery控制台中,我遇到以下错误,

Uncaught SyntaxError: Unexpected token ILLEGAL
Uncaught ReferenceError: $ is not defined
Uncaught ReferenceError: jQuery is not defined

Add the below line to development.rb, 将以下行添加到development.rb,

config.assets.debug = true

Here no need to precompile the assets. 此处无需预编译资产。

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

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