-
Notifications
You must be signed in to change notification settings - Fork 21.6k
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jQuery is included twice #5095
Comments
That's the way Sprockets works. If you include |
That would be fine, but unfortunately I can clearly see the same output even when |
Please tell us some files in your public/assets directory :-) |
@kennyj there is no
|
Umm...
It it odd... |
That is strange. I definitely can see the jquery duplicated. Here's my Gemfile.lock |
There is slight difference in the Gems, but doesn't look like related to this issue at all:
|
I'm also seeing this occur using It seems to ignore the directive of Note: this doesn't occur if you turn assets debug off as described here in the asset docs. |
So I found a temporary workaround after finding this post on stackoverflow. If you add If you haven't run So I'm fairly certain there's a bug where it doesn't acknowledge |
I have submitted a new issue ticket with a condensed description, and what I feel is a more appropriate title in the hopes that it will be easier for someone to respond to. It has been filed at Issue 5145. |
Closing this in favor of #5145 |
In development mode the jquery is included twice: 1st time as a separate file
/assets/jquery.js
and then embedded into/assets/application.js
.This effectively makes it impossible to properly use jquery and all the related stuff in development environment.
Repro:
The real problem seems to be that the
application.js
expands thejquery.js
and includes it into the page BUT doesn't exclude it itself.As a result jQuery is loaded twice (from
jquery.js
andapplication.js
):I 'm not sure why it hasn't been reported before (or has it?) as it seems to break a lot of things.
The text was updated successfully, but these errors were encountered: