【发布时间】:2023-04-08 01:02:01
【问题描述】:
我不知道为什么在 Cloud 9 框架中使用 Ruby on Rails 不识别 javascript 应用程序。 我通过 Udemy 参加了 Ruby on Rails 课程,这里是正确的 repo file 来自 Udemy 老师,当我将此代码复制到 Cloud 9 框架中时。在此文件中:/app/assets/javascripts/application.js 有这样的代码块:
var hide_spinner = function(){
$('#spinner').hide();
}
并且在“$”符号内显示以下错误:$ is not defined; please fix or add /* global $ */。 javascripts文件夹中其他以.js结尾的文件也是如此。
我已经安装了所有的 gem 并且在 application.js 中:
//= require jquery
//= require jquery_ujs
//= require twitter/bootstrap
// require turbolinks
//= require_tree .
对不起我的英语:)
请帮忙!
谢谢! ;)
【问题讨论】:
标签: javascript jquery ruby-on-rails cloud9-ide cloud9