Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Fix misused `Jquery` constant. #14

merged 1 commit into from

3 participants


Even though the gem was working normally, this produces
an incompatibility with the jquery-rails gem (reported
at rails/jquery-rails#145).

@lucasmazza lucasmazza referenced this pull request in rails/jquery-rails

jquery-rails gem can't be used with mootools-rails gem #145


FYI, I see the issue, but I left a comment over on the corresponding jquery-rails issue. Unless I'm mistaken...

...It does appear that the mootools-rails gem is misappropriating the Jquery constant name for its module, which is causing the conflict. That being said, it shouldn't matter either way.

Having looked through the source of the mootools-rails gem, it looks to be a complete replacement for the jquery-rails gem in that it completely reimplements the unobtrusive javascript (ujs) adapter to work with mootools instead of jquery.

In other words, you should be using the jquery-rails gem or the mootools-rails gem, not both.


@JangoSteve I get your point about the JS compatibility, but this fix addresses the issue where the application blows up since the assets paths are affected by the bad namespace. Also, its possible to use both gems and load just one of the _ujs scripts, which is the case of the sample app provided on the original issue.

@spangenberg spangenberg merged commit 8b96551 into spangenberg:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 9, 2014
  1. @lucasmazza
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/mootools/rails/engine.rb
2  lib/mootools/rails/engine.rb
@@ -1,4 +1,4 @@
-module Jquery
+module Mootools
module Rails
Engine =
Something went wrong with that request. Please try again.