title: jquery in Rails 3.1.1 always gives DOMException
body: <p>I created a new app</p>
  
  <pre><code>rails new toy
  cd toy
  bundle install
  rails generate controller start
  rm public/index.html
  </code></pre>
  
  <p><code>app/views/start/index.html.erb</code> contains:</p>
  
  <pre><code>Hi
  </code></pre>
  
  <p><code>app/controllers/start_controller.rb</code> contains: </p>
  
  <pre><code>class StartController &lt; ApplicationController
    def index
    end
  end
  </code></pre>
  
  <p><code>config/routes.rb</code> is:</p>
  
  <pre><code>Toy::Application.routes.draw do
    root :to =&gt; 'start#index'
  end
  </code></pre>
  
  <p>If I run it and click anywhere on the page, I get errors in the debugger:</p>
  
  <p><img src="https://i.stack.imgur.com/oAxy9.png" alt="enter image description here"></p>
  
  <p>This happens on every app I run.</p>
  
  <p>Here's the default Gemfile:</p>
  
  <pre><code>source 'https://rubygems.org'
  
  gem 'rails', '3.2.3'
  
  # Bundle edge Rails instead:
  # gem 'rails', :git =&gt; 'git://github.com/rails/rails.git'
  
  gem 'sqlite3'
  
  
  # Gems used only for assets and not required
  # in production environments by default.
  group :assets do
    gem 'sass-rails',   '~&gt; 3.2.3'
    gem 'coffee-rails', '~&gt; 3.2.1'
  
    # See https://github.com/sstephenson/execjs#readme for more supported runtimes
    # gem 'therubyracer', :platform =&gt; :ruby
  
    gem 'uglifier', '&gt;= 1.0.3'
  end
  
  gem 'jquery-rails'
  
  # To use ActiveModel has_secure_password
  # gem 'bcrypt-ruby', '~&gt; 3.0.0'
  
  # To use Jbuilder templates for JSON
  # gem 'jbuilder'
  
  # Use unicorn as the app server
  # gem 'unicorn'
  
  # Deploy with Capistrano
  # gem 'capistrano'
  
  # To use debugger
  # gem 'ruby-debug19', :require =&gt; 'ruby-debug'
  </code></pre>