title: Rails - fullCalendar not rendering JS code
body: <p>In short, I am trying to add a calendar to my rails app. I have decided upon fullCalendar (<a href="http://arshaw.com/fullcalendar/" rel="nofollow">http://arshaw.com/fullcalendar/</a>). My problem is that the JS code is not being rendered. The calendar is not appearing. Firebug, however, shows that the JS files have been called. I tested the files in Dreamweaver and the calendar functions as it should. Any idea why it is not rendering? The Javascript and CSS files are placed in their respective folders under app/assets. Here is my code that deals with fullCalendar. Any help would be greatly appreciated.</p>
  
  <p>app/assets/javascripts/application.js</p>
  
  <pre><code>//= require jquery
  //= require jquery_ujs
  //= require jquery.masonry.min.js
  //= require bootstrap
  //= require_tree .
  </code></pre>
  
  <p>app/assets/stylesheets/application.css</p>
  
  <pre><code>*= require_self
  *= require_tree .
  */
  </code></pre>
  
  <p>app/views/layouts/application.html.erb</p>
  
  <pre><code>&lt;head&gt;
      &lt;title&gt;One Month Rails&lt;/title&gt;
      &lt;%= stylesheet_link_tag    "application", :media =&gt; "all" %&gt;
      &lt;%= javascript_include_tag "application" %&gt;
      &lt;%= csrf_meta_tags %&gt;
      &lt;script&gt;
        $(document).ready(function() {
        /* initialize the external events
        -----------------------------------------------------------------*/
        $('#external-events div.external-event').each(function() {
        // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/)
        // it doesn't need to have a start or end
        var eventObject = {
        title: $.trim($(this).text()) // use the element's text as the event title
        };
        // store the Event Object in the DOM element so we can get to it later
        $(this).data('eventObject', eventObject);
        // make the event draggable using jQuery UI
        $(this).draggable({
        zIndex: 999,
        revert: true, // will cause the event to go back to its
        revertDuration: 0 // original position after the drag
        });
        });
        /* initialize the calendar
        -----------------------------------------------------------------*/
        $('#calendar').fullCalendar({
        header: {
        left: 'prev,next today',
        center: 'title',
        right: 'month,agendaWeek,agendaDay'
        },
        editable: true,
        droppable: true, // this allows things to be dropped onto the calendar !!!
        drop: function(date, allDay) { // this function is called when something is dropped
        // retrieve the dropped element's stored Event Object
        var originalEventObject = $(this).data('eventObject');
        // we need to copy it, so that multiple events don't have a reference to the same object
        var copiedEventObject = $.extend({}, originalEventObject);
        // assign it the date that was reported
        copiedEventObject.start = date;
        copiedEventObject.allDay = allDay;
        // render the event on the calendar
        // the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
        $('#calendar').fullCalendar('renderEvent', copiedEventObject, true);
        // is the "remove after drop" checkbox checked?
        if ($('#drop-remove').is(':checked')) {
        // if so, remove the element from the "Draggable Events" list
        $(this).remove();
        }
        }
        });
        });
      &lt;/script&gt;
    &lt;/head&gt;
  </code></pre>
  
  <p>app/views/layouts/page.html.erb</p>
  
  <pre><code>&lt;div id='wrap'&gt;
      &lt;div id='external-events'&gt;
          &lt;h4&gt;Draggable Events&lt;/h4&gt;
          &lt;div class='external-event'&gt;My Event 1&lt;/div&gt;
          &lt;div class='external-event'&gt;My Event 2&lt;/div&gt;
          &lt;div class='external-event'&gt;My Event 3&lt;/div&gt;
          &lt;div class='external-event'&gt;My Event 4&lt;/div&gt;
          &lt;div class='external-event'&gt;My Event 5&lt;/div&gt;
          &lt;p&gt;
              &lt;input type='checkbox' id='drop-remove' /&gt; &lt;label for='drop-remove'&gt;remove after drop&lt;/label&gt;
          &lt;/p&gt;
      &lt;/div&gt;
          &lt;div id='calendar'&gt;&lt;/div&gt;
          &lt;div style='clear:both'&gt;&lt;/div&gt;
      &lt;/div&gt;
  </code></pre>