title: Bootstrap 3 Modal with Rails 4 not showing
body: <p>I asked a question relating to this issue the other day, but encountered another error.
  I have Index.html.erb with a link_to calling the modal. Once the modal is open I want the body of it to include a partial. 
  Most of my code is from the Bootstrap example because I want to get it working first before I include all my form details in the partial.</p>
  
  <p><strong>gemfile:</strong></p>
  
  <pre><code>group :assets do
      gem 'sass-rails', '4.0.1'
      gem 'bootstrap-sass', '3.0.2.0'
      gem 'bootstrap-modal-rails'
  end 
  </code></pre>
  
  <p><strong>application.js</strong></p>
  
  <pre><code>//= require jquery
  //= require jquery_ujs
  //= require turbolinks
  //= require bootstrap
  //= require bootstrap/modal
  //= require_tree .
  </code></pre>
  
  <p><strong>Index.html.erb</strong> (In views/gifts)</p>
  
  <pre><code>&lt;p&gt;&lt;%= link_to 'Buy', gift_path(gift), {:remote =&gt; true, 'data-toggle' =&gt;  "modal", 'data-target' =&gt; '#myModal', :class =&gt; "btn btn-primary ", :id =&gt; 'myModal'} %&gt;&lt;/p&gt;
          &lt;!-- Modal --&gt;
          &lt;div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
            &lt;div class="modal-dialog"&gt;
              &lt;div class="modal-content"&gt;
                &lt;div class="modal-header"&gt;
                  &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt;
                  &lt;h4 class="modal-title" id="myModalLabel"&gt;Modal title&lt;/h4&gt;
                &lt;/div&gt;
                &lt;div class="modal-body"&gt;
                  &lt;%= render 'gifts/show' %&gt;
                &lt;/div&gt;
                &lt;div class="modal-footer"&gt;
                  &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
                  &lt;button type="button" class="btn btn-primary"&gt;Save changes&lt;/button&gt;
                &lt;/div&gt;
              &lt;/div&gt;&lt;!-- /.modal-content --&gt;
            &lt;/div&gt;&lt;!-- /.modal-dialog --&gt;
          &lt;/div&gt;&lt;!-- /.modal --&gt;
  </code></pre>
  
  <p><strong>_show.html.erb</strong> (In views/gifts/)</p>
  
  <pre><code>&lt;p&gt;This is a gift.&lt;/p&gt;
  </code></pre>
  
  <p><strong>gifts.js.coffee</strong> (In assets/javascripts/)</p>
  
  <pre><code>$('#myModal').modal('options')
  </code></pre>
  
  <p><strong>gifts.controller.rb</strong> (Just the show function)</p>
  
  <pre><code>   def show
          @gift = Gift.find(params[:id])
          respond_to do |format|
            format.html {render :show}
            format.json { head :ok}
          end
      end 
  </code></pre>
  
  <p>When I click the button in the browser, my rails terminal show this:</p>
  
  <pre><code>Processing by GiftsController#show as JS
  </code></pre>
  
  <p>When I view the javascript console in my browser, I see a JS error :</p>
  
  <pre><code>[Error] TypeError: '[object Object]' is not a function (evaluating 'f[c](d)')
  (anonymous function) (bootstrap.min.js, line 7)
  each (jquery.js, line 657)
  each (jquery.js, line 266)
  modal (bootstrap.min.js, line 7)
  ready (application.js, line 23)
  fire (jquery.js, line 3049)
  fireWith (jquery.js, line 3161)
  ready (jquery.js, line 434)
  completed (jquery.js, line 105)
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>