You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! It seems like this gem isn't cooperating with Rails' move towards Wepback/Yarn and the fact that Rails 5.1 no longer includes jQuery by default.
Adding jQuery through Yarn with yarn add jquery results in the following error in the console:
Uncaught ReferenceError: jQuery is not defined
The only way to resolve this is to avoid packing jQuery with Yarn and manually including it in the pre-Rails 5.1 way. I had to add gem 'jquery-rails' back to my Gemfile and then require jquery/jquery_ujs in my app/assets/javascripts/application.js file. (//= require jquery //= require jquery_ujs)
The text was updated successfully, but these errors were encountered:
@davidmccoy even use jquery-rails not work.
i always got this error: bootstrap.self-fdc98de….js?body=1:3 Uncaught TypeError: $(...).popover is not a function at HTMLDocument.<anonymous> (bootstrap.self-fdc98de….js?body=1:3) at fire (jquery.self-bd7ddd3….js?body=1:3233) at Object.fireWith [as resolveWith] (jquery.self-bd7ddd3….js?body=1:3363) at Function.ready (jquery.self-bd7ddd3….js?body=1:3583) at HTMLDocument.completed (jquery.self-bd7ddd3….js?body=1:3618)
Hello! It seems like this gem isn't cooperating with Rails' move towards Wepback/Yarn and the fact that Rails 5.1 no longer includes jQuery by default.
Adding jQuery through Yarn with
yarn add jquery
results in the following error in the console:Uncaught ReferenceError: jQuery is not defined
The only way to resolve this is to avoid packing jQuery with Yarn and manually including it in the pre-Rails 5.1 way. I had to add
gem 'jquery-rails'
back to my Gemfile and then requirejquery/jquery_ujs
in my app/assets/javascripts/application.js file. (//= require jquery //= require jquery_ujs
)The text was updated successfully, but these errors were encountered: