JavaScript在Rails中不起作用——导致删除路径不起作用,还有一些问题

JavaScript在Rails中不起作用——导致删除路径不起作用,还有一些问题,javascript,ruby-on-rails,ruby,ruby-on-rails-4,bootstrap-wysiwyg,Javascript,Ruby On Rails,Ruby,Ruby On Rails 4,Bootstrap Wysiwyg,所以现在发生的事情是,我试图删除一个特定的资源--post。当我点击删除按钮时,它只会引导我进入文章的显示视图 我还有一个WYSIWYG gem,它使用不再运行的JavaScript。我在我的应用程序文件中包含了JS标记,如下所示: <%= javascript_include_tag "application" %> jqueryrails也在我的文件中 有什么想法吗 JS控制台: Uncaught ReferenceError: jQuery is not defined jq

所以现在发生的事情是,我试图删除一个特定的资源--
post
。当我点击删除按钮时,它只会引导我进入文章的显示视图

我还有一个WYSIWYG gem,它使用不再运行的JavaScript。我在我的应用程序文件中包含了JS标记,如下所示:

<%= javascript_include_tag "application" %>
jqueryrails
也在我的文件中

有什么想法吗

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

我尝试过的

我将
链接改为
按钮改为
,看看会发生什么。它允许删除帖子,但不需要确认。它并没有真正解决JavaScript问题。

通过添加

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>


在我的应用程序文件的顶部。

没有“错误”。发生的情况是,“当我点击删除按钮时,它只会引导我进入帖子的显示视图”,而不是删除它。如果我们能解决这个问题,我相信WYSIWYG gem会自行修复。@apheadingCheck你的js控制台js控制台在哪里@apheadingin Chrome中,按CMD-ALT-I(Mac)/CTRL-ALT-I(Win)打开开发者工具。请切换到控制台选项卡,告诉我们报告了哪些错误。更新了原始帖子@janfeh
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>