title: Rails: Bootstrap dropdown menu not working
body: <p>I am quite new to Rails and have been following the tutorial by Michael Hartl.  Everything has been going along really well until I got to the drop down menu, which was wasn't working, then was working and now isn't working :(  I've read several posts and fixes and I suspect my tinkering has gotten to the point where quite simply, I've done something to stop it working.
  I will say that I initially had the bootstrap-sass 2.x in my gem file, then changed it to 3.x, but went back to 2.x because I didn't realise that going to 3.x would result in issues due to class name changes.  So, perhaps the time this was working was when I had bootstrap-sass 3.x installed, not sure.  From what I can tell though everything is set up the way it needs to be.  I am developing under Windows 8.1 and I had to fix an issue with execjs and in specific the runtimes.rb file.  So, here are my details:</p>
  
  <p>Gemfile:</p>
  
  <pre><code>source 'https://rubygems.org'
  ruby '1.9.3'
  # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
  gem 'rails', '4.0.2'
  gem 'bootstrap-sass', '2.3.2.0'
  gem 'sprockets', '2.11.0'
  gem 'bcrypt-ruby', '3.1.2'
  
  # Use sqlite3 as the database for Active Record
  gem 'mysql2', '0.3.15'
  
  # Use SCSS for stylesheets
  gem 'sass-rails', '4.0.1'
  
  # Use Uglifier as compressor for JavaScript assets
  gem 'uglifier', '1.3.0'
  
  # Use CoffeeScript for .js.coffee assets and views
  gem 'coffee-rails', '4.0.1'
  
  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', platforms: :ruby
  
  # Use jquery as the JavaScript library
  gem 'jquery-rails'
  
  # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
  gem 'turbolinks'
  
  # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
  gem 'jbuilder', '1.2'
  </code></pre>
  
  <p>application.js</p>
  
  <pre><code>//= require jquery
  //= require jquery_ujs
  //= require bootstrap
  //= require turbolinks
  //= require_tree .
  </code></pre>
  
  <p>_header.html.erb (where the drop down is)</p>
  
  <pre><code>&lt;header class="navbar navbar-fixed-top navbar-inverse"&gt;
    &lt;div class="navbar-inner"&gt;
      &lt;div class="container"&gt;
        &lt;%= link_to "Catered Fit", root_path, id: "logo" %&gt;
  &lt;!--      &lt;%= link_to image_tag("logo.jpg", width: "25%"), root_path %&gt;    --&gt;
        &lt;nav&gt;
          &lt;div class="nav pull-right"&gt;
  &lt;!--          &lt;li&gt;&lt;%= link_to "Home", root_path %&gt;&lt;/li&gt;
            &lt;li&gt;&lt;%= link_to "Help", help_path %&gt;&lt;/li&gt;   --&gt;
            &lt;% if !signed_in? %&gt;
              &lt;div class="navbar-form"&gt;
              &lt;%= form_for(:session, url: sessions_path) do |f| %&gt;
                &lt;div class="span2 input-xlarge"&gt;
                  &lt;% f.label :email %&gt;
                  &lt;%= f.text_field :email, placeholder: "Email" %&gt;
                &lt;/div&gt;
                &lt;div class="span2 input-small"&gt;
                  &lt;% f.label :password %&gt;
                  &lt;%= f.password_field :password, placeholder: "Password" %&gt;
                &lt;/div&gt;
                &lt;div class="span2"&gt;
                  &lt;%= f.submit "Sign in", class: "btn btn-primary" %&gt;
                &lt;/div&gt;
              &lt;% end %&gt;
            &lt;% else %&gt;  
              &lt;li&gt;&lt;%= link_to "Users", '#' %&gt;&lt;/li&gt;
              &lt;li id="fat-menu" class="dropdown"&gt;
                &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown"&gt;
                  Account &lt;b class="caret"&gt;&lt;/b&gt;
                &lt;/a&gt;
                &lt;ul class="dropdown-menu"&gt;
                  &lt;li&gt;&lt;%= link_to "Profile", current_user %&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;%= link_to "Settings", edit_user_path(current_user) %&gt;&lt;/li&gt;
                  &lt;li class="divider"&gt;&lt;/li&gt;
                  &lt;li&gt;
                    &lt;%= link_to "Sign out", signout_path, method: "delete" %&gt;
                  &lt;/li&gt;
                &lt;/ul&gt;
                &lt;li&gt;&lt;%= link_to "Sign out", signout_path, method: "delete" %&gt;&lt;/li&gt;
              &lt;/li&gt;
            &lt;% end %&gt;
          &lt;/div&gt;
        &lt;/nav&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/header&gt;
  </code></pre>
  
  <p>I don't see any errors in the console window and apart from the drop down everything else is working fine.</p>
  
  <p>The following is the source code from the webpage:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;Ruby on Rails Tutorial Sample App | Dave Williams&lt;/title&gt;
      &lt;link data-turbolinks-track="true" href="/assets/application.css" media="all" rel="stylesheet" /&gt;
      &lt;script data-turbolinks-track="true" src="/assets/application.js"&gt;&lt;/script&gt;
      &lt;meta content="authenticity_token" name="csrf-param" /&gt;
  &lt;meta content="SlKTCvDr5MFLP0EkthJHQeGIw+Yp0oGUrxvAeQMnVts=" name="csrf-token" /&gt;
      &lt;!--[if lt IE 9]&gt;
  &lt;script src="http://html5shim.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;
  &lt;![endif]--&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;header class="navbar navbar-fixed-top navbar-inverse"&gt;
    &lt;div class="navbar-inner"&gt;
      &lt;div class="container"&gt;
        &lt;a href="/" id="logo"&gt;Catered Fit&lt;/a&gt;
  &lt;!--      &lt;a href="/"&gt;&lt;img alt="Logo" src="/assets/logo.jpg" width="25%" /&gt;&lt;/a&gt;    --&gt;
        &lt;nav&gt;
          &lt;div class="nav pull-right"&gt;
  &lt;!--          &lt;li&gt;&lt;a href="/"&gt;Home&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="/help"&gt;Help&lt;/a&gt;&lt;/li&gt;   --&gt;
              &lt;li&gt;&lt;a href="#"&gt;Users&lt;/a&gt;&lt;/li&gt;
              &lt;li id="fat-menu" class="dropdown"&gt;
                &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown"&gt;
                  Account &lt;b class="caret"&gt;&lt;/b&gt;
                &lt;/a&gt;
                &lt;ul class="dropdown-menu"&gt;
                  &lt;li&gt;&lt;a href="/users/1"&gt;Profile&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="/users/1/edit"&gt;Settings&lt;/a&gt;&lt;/li&gt;
                  &lt;li class="divider"&gt;&lt;/li&gt;
                  &lt;li&gt;
                    &lt;a data-method="delete" href="/signout" rel="nofollow"&gt;Sign out&lt;/a&gt;
                  &lt;/li&gt;
                &lt;/ul&gt;
                &lt;li&gt;&lt;a data-method="delete" href="/signout" rel="nofollow"&gt;Sign out&lt;/a&gt;&lt;/li&gt;
              &lt;/li&gt;
          &lt;/div&gt;
        &lt;/nav&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/header&gt;
      &lt;div class="container"&gt;
        &lt;div class="row"&gt;
    &lt;aside class="span4"&gt;
      &lt;section&gt;
        &lt;h1&gt;
          &lt;img alt="Dave Williams" class="gravatar" src="https://secure.gravatar.com/avatar/387593e03fccc38895fc20a2084e27f5?s=50" /&gt;
          Dave Williams
        &lt;/h1&gt;
      &lt;/section&gt;
    &lt;/aside&gt;
  &lt;/div&gt;
  
        &lt;footer class="footer"&gt;
    &lt;small&gt;
      &lt;a href="http://railstutorial.org/"&gt;Rails Tutorial&lt;/a&gt;
      by Michael Hartl
    &lt;/small&gt;
    &lt;nav&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href="/about"&gt;About&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="/contact"&gt;Contact&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://news.railstutorial.org/"&gt;News&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/nav&gt;
  &lt;/footer&gt;
        &lt;pre class="debug_dump"&gt;--- !ruby/hash:ActionController::Parameters
  action: show
  controller: users
  id: &amp;#39;1&amp;#39;
  &lt;/pre&gt;
      &lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Would really appreciate some help on this to get past this issue.</p>
  
  <p>Thanks in advance, and please let me know if I can provide anymore information.</p>