title: Localhost running jquery twice?
body: <p>I've been working on a Rails app for months.  Today when I run the app on localhost, it seems like jquery is executing twice on each page.</p>
  
  <p>I'm running on an iMac.</p>
  
  <p>Some symptoms are:</p>
  
  <ol>
  <li>DataTables is telling me "Cannot rein initialize DataTables"</li>
  <li>Full-calendar is displaying 2 calendars on a page instead of 1</li>
  <li>Bootstrap dropdown menus don't work</li>
  </ol>
  
  <p>It's really got me baffled !!!</p>
  
  <p>Thanks for the help!</p>
  
  <p>UPDATE1</p>
  
  <p>The same app runs fine when I Cap Deploy to a Rails Virtual Server.  So, it seems to me that it has something to do with my iMac environment.  </p>
  
  <p>I'm not sure what code to show.  Because the jquery/javascript code seems to fire twice in all the number examples above.</p>
  
  <p>Here is the view code for the calendar (the calendar now displays twice on the page):</p>
  
  <pre><code>&lt;h2&gt;&lt;%= current_user.employee.employee_full_name %&gt; - Labor Month&lt;/h2&gt;
  &lt;%= content_tag "div", id: "calendar", data: {employeeid: current_user.employee.id} do %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>And the coffee script:</p>
  
  <pre><code>$(document).ready -&gt;
  
  $('#calendar').fullCalendar
    ignoreTimezone: true,
    editable: true,
    defaultView: 'month',
    height: 500,
    slotMinutes: 30,
    selectable: true,
    selectHelper: true,
  
  select: (start, end, allDay) -&gt;
    title = $("#title")
    description = $("#description")
    hours = $("#hours")
    workorder = $("#workorder_id")
    actcode = $("#actcode_id")
    $("#dialog-form").dialog
      autoOpen: true
      height: 500
      width: 400
      modal: true
      buttons:
       "Create Labor": -&gt;
         $.create "/events/",
           event:
             workorder_id: workorder.val(),
             actcode_id: actcode.val(),
             title: title.val(),
             description: description.val(),
             hours: hours.val()
             starts_at: "" + start,
             ends_at: "" + end,
             all_day: allDay,
             employee_id: $('#calendar').data('employeeid')
         $('#calendar').fullCalendar('refetchEvents')
         $(this).dialog "close"
  
        Cancel: -&gt;
          $(this).dialog "close"
  
  eventSources: [{
    url: '/events',
  }],
  
  timeFormat: 'h:mm t{ - h:mm t} ',
  dragOpacity: "0.5"
  
  eventDrop: (event, dayDelta, minuteDelta, allDay, revertFunc) -&gt;
    updateEvent(event);
  
  eventResize: (event, dayDelta, minuteDelta, revertFunc) -&gt;
    updateEvent(event);
  
  updateEvent = (the_event) -&gt;
    $.update "/events/" + the_event.id,
      event:
        title: the_event.title,
        starts_at: "" + the_event.start,
        ends_at: "" + the_event.end,
        description: the_event.description
  </code></pre>
  
  <p>UPDATE3</p>
  
  <pre><code>Some gems I'm using related to javascript:
  gem 'twitter-bootstrap-rails'
  gem 'jquery-rails'
  gem 'fullcalendar-rails'
  gem 'jquery-rest-rails'
  gem 'gmaps4rails'
  gem 'bootstrap-editable-rails'
  gem 'jquery-datatables-rails'
  gem 'jqtree-rails'
  </code></pre>
  
  <p>UPDATE4</p>
  
  <p>Is there something I should be looking at Chrome inspect element?</p>
  
  <p>UPDATE5</p>
  
  <p>@abhi and Wizard of Ogz said to delete the public assets or try putting this into development.rb = config.assets.debug = false .  When I added the line to the development.rb, the errors went away.</p>
  
  <p>Now I'm not sure what I should do next.  I would like to be able to debug assets.</p>