Pickels
Pickels

Reputation: 34632

jQuery gets included twice

I have a problem in my rails app that jQuery is included twice. Once it's referenced normally with a script tag and once minimized inside application.js. I noticed it because the destroy confirmation messages were popping up twice.

So is there a way to turn off the minimized version locally?

My head looks like:

<head>
  <title>Wirent</title>
  <%= stylesheet_link_tag    "application" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
</head>

My application.js looks like:

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

Upvotes: 3

Views: 1708

Answers (1)

Pickels
Pickels

Reputation: 34632

It's because I pre-compiled my assets. So assets were also being loaded from public/assets.

This answer explained it: https://stackoverflow.com/q/7778048/145117

Upvotes: 4

Related Questions