title: Rails5 Bootstrap collapse not working
body: <p>Railsnoob here. Bootstrap collapse is not properly working in my app. I tried it in a fresh created rails app but it's also not working:</p>
  
  <p>My Gemfile looks like this:</p>
  
  <pre><code>source 'https://rubygems.org'
  
  gem 'rails'
  gem 'bootstrap-sass'
  gem 'puma'
  gem 'sass-rails'
  gem 'uglifier'
  gem 'coffee-rails'
  gem 'jquery-rails'
  gem 'turbolinks'
  gem 'jbuilder'
  
  group :development, :test do
    gem 'sqlite3'
    gem 'byebug'
  end
  
  group :development do
    gem 'web-console'
    gem 'listen'
    gem 'spring'
    gem 'spring-watcher-listen'
  end
  
  group :test do
    gem 'rails-controller-testing'
    gem 'minitest-reporters'
    gem 'guard'
    gem 'guard-minitest'
  end
  
  group :production do
    gem 'pg'
  end
  </code></pre>
  
  <p>app/assets/stylesheets/custom.scss:</p>
  
  <pre><code>@import "bootstrap-sprockets";
  @import "bootstrap";
  </code></pre>
  
  <p>app/views/pages/home.html.erb
  It contains the first example of the bootstrap collapse documentation:</p>
  
  <pre><code>&lt;h1&gt;Pages#home&lt;/h1&gt;
  &lt;p&gt;Find me in app/views/pages/home.html.erb&lt;/p&gt;
  
  &lt;p&gt;
    &lt;a class="btn btn-primary" data-toggle="collapse" href="#collapseExample" aria-expanded="false" aria-controls="collapseExample"&gt;
      Link with href
    &lt;/a&gt;
    &lt;button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample"&gt;
      Button with data-target
    &lt;/button&gt;
  &lt;/p&gt;
  &lt;div class="collapse" id="collapseExample"&gt;
    &lt;div class="card card-body"&gt;
      Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident.
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I just can't figure out why it's not working. Am I missing a gem?</p>
  
  <p>Edit: Found the solution, thanks to Ishwar Deoolkar :)</p>
  
  <p>I added the following line in the head:</p>
  
  <pre><code>&lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"&gt;
  </code></pre>
  
  <p>and this line at the end of the body:</p>
  
  <pre><code>&lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"&gt;&lt;/script&gt;
  </code></pre>