0

I am getting an error in my console 'JQuery is not defined'.

Gemfile

# Use jquery as the JavaScript library
gem 'jquery-rails'

application.js

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

I have ran bundle install. What else should I check?

Adam12344
  • 1,043
  • 16
  • 33
  • 1
    View your Rails app in your browser and "View Source" (usually Ctrl + Shift + U). Do you see jQuery in there anywhere? Anything look weird? – RobertAKARobin Oct 14 '16 at 00:54
  • 1
    hope your application.html.erb has application.js included...Can you again check for jquery in console tab of browser that its loaded...? – Milind Oct 14 '16 at 00:54
  • The source looks normal, the term jquery isn't in the source. Page also cotains – Adam12344 Oct 14 '16 at 01:04
  • I'd first look at this question and its accepted answer: http://stackoverflow.com/questions/2194992/jquery-is-not-defined – Tass Oct 14 '16 at 21:51

1 Answers1

0

If you're using 'JQuery' in your code, try 'jQuery' or '$' instead of 'JQuery'.

YTorii
  • 376
  • 2
  • 9