简体   繁体   中英

Jquery not loading in rails 3.2.6

I'm having trouble figuring out why Jquery isn't loading in my rails 3.2.6 app. When I use "$" in the browser console, it is said that:

function $() { [Command Line API] } 

Then, when I view the source in the browser, it seems the Jquery not loading:

<link href="/assets/application.css?body=1" media="all" rel="stylesheet" type="text/css" />
<script src="/assets/application.js?body=1" type="text/javascript"></script>

In Application.html.erb:

<%= javascript_include_tag "application" %>   
<%= stylesheet_link_tag    "application", :media => "all" %>
<%= csrf_meta_tags %>

Application.js:

//= require jquery
//= require jquery_ujs
//= require_tree .

Any help is greatly appreciated.

javascript_include_tag  "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"
javascript_include_tag  "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"
javascript_include_tag "jquery-rails.js"

For more Details check this site CLICK HERE

ALSO chk this question CLICK HERE

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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