所以现在发生的事情是我试图删除一个特定的资源——一个post
. 当我单击删除按钮时,它只会引导我进入帖子的显示视图。
我还有一个 WYSIWYG gem,它使用不再执行的 JavaScript。我在我的应用程序文件中包含了 JS 标记,如下所示:
<%= javascript_include_tag "application" %>
在我的 application.js 中:
//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require bootstrap-wysihtml5/b3
//= require_tree .
jquery-rails
也在我的 Gemfile 中。
有任何想法吗?
JS 控制台:
Uncaught ReferenceError: jQuery is not defined jquery_ujs.js:398
Uncaught ReferenceError: jQuery is not defined affix.js:138
Uncaught ReferenceError: jQuery is not defined alert.js:89
Uncaught ReferenceError: jQuery is not defined button.js:108
Uncaught ReferenceError: jQuery is not defined carousel.js:206
Uncaught ReferenceError: jQuery is not defined collapse.js:171
Uncaught ReferenceError: jQuery is not defined dropdown.js:148
Uncaught ReferenceError: jQuery is not defined tab.js:126
Uncaught ReferenceError: jQuery is not defined transition.js:49
Uncaught ReferenceError: jQuery is not defined scrollspy.js:154
Uncaught ReferenceError: jQuery is not defined modal.js:244
Uncaught ReferenceError: jQuery is not defined tooltip.js:400
Uncaught ReferenceError: jQuery is not defined popover.js:111
Uncaught TypeError: Cannot read property 'fn' of undefined core-b3.js:383
Uncaught TypeError: Cannot read property 'helper' of undefined blueimp-gallery-fullscreen.js:26
Uncaught TypeError: Cannot read property 'helper' of undefined blueimp-gallery-indicator.js:26
Uncaught TypeError: Cannot read property 'helper' of undefined blueimp-gallery-video.js:26
Uncaught TypeError: Cannot read property 'helper' of undefined blueimp-gallery-vimeo.js:26
Uncaught TypeError: Cannot read property 'helper' of undefined blueimp-gallery-youtube.js:26
Uncaught TypeError: Cannot read property 'extend' of undefined blueimp-gallery.js:56
Uncaught ReferenceError: $ is not defined demo.js:15
Uncaught ReferenceError: jQuery is not defined galleria-1.3.5.js:6863
Uncaught ReferenceError: jQuery is not defined galleria.flickr.js:384
Uncaught TypeError: undefined is not a function jquery.blueimp-gallery.js:33
Uncaught TypeError: undefined is not a function jquery.blueimp-gallery.min.js?body=1:1
Uncaught ReferenceError: $ is not defined application.js:20
我试过的
我改变了link_to
,button_to
看看会发生什么。它允许删除帖子——不过,无需确认。它并不能真正解决 JavaScript 问题。