title: sb admin 2 multi-level menu not collapsing
body: <p>I am trying to integrate the menu of the sb admin 2 template to my ruby on rails app: <a href="http://startbootstrap.com/template-overviews/sb-admin-2/" rel="nofollow">http://startbootstrap.com/template-overviews/sb-admin-2/</a></p>
  
  <p>I tried adding piece by piece to see how things work. I added the top and side nav bars, but have a problem when adding the  multi-level menu, it doesn't collapse, and starts open. I even checked all referenced js and css files to see which made the the menu collapse and expand, but only found in sb-admin-2.css a reference to the starting style. </p>
  
  <p>I included all the css and js files included in the included index.html to my application.html.erb (through the stylesheet_link_tag, rails automatically adds the files in assets, I checked by looking at the source code and they were there. ) Can anyone please provide me with help on how to solve this issue?</p>
  
  <p>Thanks for all your help.</p>
  
  <p>Here's the code for the nav bar:</p>
  
  <pre><code>&lt;nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0"&gt;
  &lt;div class="navbar-header"&gt;
      &lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"&gt;
          &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
      &lt;/button&gt;
      &lt;a class="navbar-brand" href="#"&gt;Title&lt;/a&gt;
  &lt;/div&gt;
  
  &lt;div class="navbar-default sidebar" role="navigation"&gt;
      &lt;div class="sidebar-nav navbar-collapse"&gt;
          &lt;ul class="nav" id="side-menu"&gt;
              &lt;li&gt;
                  &lt;a href="#"&gt;&lt;i class="fa fa-sitemap fa-fw"&gt;&lt;/i&gt; Multi-Level Dropdown&lt;span class="fa arrow"&gt;&lt;/span&gt;&lt;/a&gt;
                  &lt;ul class="nav nav-second-level"&gt;
                      &lt;li&gt;
                          &lt;a href="#"&gt;Second Level Item&lt;/a&gt;
                      &lt;/li&gt;
                      &lt;li&gt;
                          &lt;a href="#"&gt;Third Level &lt;span class="fa arrow"&gt;&lt;/span&gt;&lt;/a&gt;
                          &lt;ul class="nav nav-third-level"&gt;
                              &lt;li&gt;
                                  &lt;a href="#"&gt;Third Level Item&lt;/a&gt;
                              &lt;/li&gt;
                          &lt;/ul&gt;
                          &lt;!-- /.nav-third-level --&gt;
                      &lt;/li&gt;
                  &lt;/ul&gt;
                  &lt;!-- /.nav-second-level --&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>--EDITED AFTER FIRST ANSWER: 
  I checked your code and it is what I have in the files sb-admin-2.css, sb-admin-2.j, metisMenu_min.js. </p>
  
  <p>Could it be that rails is messing up the dependencies: 
  This is my code in rails of the references:</p>
  
  <pre><code>&lt;%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' =&gt; true %&gt;  
  &lt;%= javascript_include_tag 'application', 'data-turbolinks-track' =&gt; true %&gt;  
  &lt;%= csrf_meta_tags %&gt;
  </code></pre>
  
  <p>And this is the source code of the references of the page when open in the browser:</p>
  
  <pre><code>&lt;link rel="stylesheet" media="all" href="/assets/font-awesome.self-be09f9a5a5e8fd15a4e4d68dc8509252a33dc056003e53159586cf99368ba0e7.css?body=1" data-turbolinks-track="true" /&gt;
  &lt;link rel="stylesheet" media="all" href="/assets/bootstrap.min.self-2c354d7c0179bd35563b93633b23ac5fb07c67d531d40a75695bacbd0eadb799.css?body=1" data-turbolinks-track="true" /&gt;
  &lt;link rel="stylesheet" media="all" href="/assets/involved_party_types.self-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css?body=1" data-turbolinks-track="true" /&gt;
  &lt;link rel="stylesheet" media="all" href="/assets/metisMenu.min.self-39a68158cd09f5740df90344edf98bf0dec5b8b07d6f8c5e1faed3f2bbf208f2.css?body=1" data-turbolinks-track="true" /&gt;
  &lt;link rel="stylesheet" media="all" href="/assets/morris.self-b331eeb1aa336d072d4e7e055fede5e44d00e73a31cfbfa77b87ebf0d816265c.css?body=1" data-turbolinks-track="true" /&gt;
  &lt;link rel="stylesheet" media="all" href="/assets/sb-admin-2.self-b9c045d4d7df05f2762c0576263ab2fdb31ede2538fbf47ce4539deb708c4a53.css?body=1" data-turbolinks-track="true" /&gt;
  &lt;link rel="stylesheet" media="all" href="/assets/scaffolds.self-551705b6f8cb8e2c3149bc63ddf9d6103fc4b9852aaa51b390f60f08f2979c12.css?body=1" data-turbolinks-track="true" /&gt;
  &lt;link rel="stylesheet" media="all" href="/assets/timeline.self-adcf4ac8978841626cabd1a65b1ae2b0419a1ddb13083a5aa5959a60bef9cfb5.css?body=1" data-turbolinks-track="true" /&gt;
  &lt;link rel="stylesheet" media="all" href="/assets/application.self-927f1a911022a64b9126b19f80d94eb609a1aec9f0183c419caad57bd88fb8af.css?body=1" data-turbolinks-track="true" /&gt;  
  &lt;script src="/assets/jquery.self-a714331225dda820228db323939889f149aec0127aeb06255646b616ba1ca419.js?body=1" data-turbolinks-track="true"&gt;&lt;/script&gt;
  &lt;script src="/assets/jquery_ujs.self-d456baa54c1fa6be2ec3711f0a72ddf7a5b2f34a6b4f515f33767d6207b7d4b3.js?body=1" data-turbolinks-track="true"&gt;&lt;/script&gt;
  &lt;script src="/assets/turbolinks.self-c37727e9bd6b2735da5c311aa83fead54ed0be6cc8bd9a65309e9c5abe2cbfff.js?body=1" data-turbolinks-track="true"&gt;&lt;/script&gt;
  &lt;script src="/assets/bootstrap.min.self-d66e555f160df017adf1ca16a36cd609a36d49c51637e365c5b8847d0065fa40.js?body=1" data-turbolinks-track="true"&gt;&lt;/script&gt;
  &lt;script src="/assets/involved_party_types.self-877aef30ae1b040ab8a3aba4e3e309a11d7f2612f44dde450b5c157aa5f95c05.js?body=1" data-turbolinks-track="true"&gt;&lt;/script&gt;
  &lt;script src="/assets/jquery.min.self-6806c88afe0840c35208894c4ceba911154f696b624614b30b884298c2c3e00d.js?body=1" data-turbolinks-track="true"&gt;&lt;/script&gt;
  &lt;script src="/assets/metisMenu.min.self-2dce2e92b1c09f455d4d44807dcb76a7e68af9aacd6a940114f2241e41b0efb0.js?body=1" data-turbolinks-track="true"&gt;&lt;/script&gt;
  &lt;script src="/assets/sb-admin-2.self-56bd6a6e5b0d37d83b0261b8de91fb454a750a4641c24bdc62f1bc5d860acb39.js?body=1" data-turbolinks-track="true"&gt;&lt;/script&gt;
  &lt;script src="/assets/application.self-3b8dabdc891efe46b9a144b400ad69e37d7e5876bdc39dee783419a69d7ca819.js?body=1" data-turbolinks-track="true"&gt;&lt;/script&gt;  
  &lt;meta name="csrf-param" content="authenticity_token" /&gt;
  &lt;meta name="csrf-token" content="Q5ZWAYlRNAWFPn+j2HXW+XoZqF9joNByaIKGaFx6sjzcYgzp6um28PSRJ6LswzK7CuOTMjg1+CETZut4CmOzbg==" /&gt;
  </code></pre>