title: Rails: Couldn't find a file for 'twitter/bootstrap'
body: <p>I'm using twitter bootstrap in my Rails application. It works well in development mode but does not in production. Here is the Gemfile</p>
  
  <pre><code>source 'https://rubygems.org'
  
  ruby '1.9.3'
  gem 'rails' 
  gem 'jquery-rails'
  gem 'haml-rails'
  gem 'devise'
  gem 'bcrypt-ruby'
  gem 'curb'
  gem 'nokogiri'
  gem 'pg'
  
  group :assets do
    gem 'sass-rails'
    gem 'twitter-bootstrap-rails'
    gem 'uglifier'
  end
  </code></pre>
  
  <p>When I run it as rails s -e production it gives me the error of</p>
  
  <pre><code>ActionView::Template::Error (couldn't find file 'twitter/bootstrap'
    (in /home/alex/Documents/ruby_projects/p1/app/assets/javascripts/application.js:15)):
  </code></pre>
  
  <p><strong>Application.js</strong></p>
  
  <pre><code>//= require jquery
  //= require jquery_ujs
  //= require twitter/bootstrap
  //= require_tree .
  </code></pre>
  
  <p><strong>production.rb</strong></p>
  
  <pre><code>config.serve_static_assets = false
  
  # Compress JavaScripts and CSS
  config.assets.compress = true
  
  # Don't fallback to assets pipeline if a precompiled asset is missed
  config.assets.compile = true
  
  # Generate digests for assets URLs
  config.assets.digest = true
  </code></pre>
  
  <p>Somebody suggested me to remove <code>gem 'twitter-bootstrap-rails'</code> which I cannot do because I use it or move it outside of group assets which didn't help me either: the application well except the fact that twitter bootstrap files (js and css) weren't loaded at all.</p>
  
  <p>How do I fix it?</p>
  
  <p><strong>UPDATE</strong>: </p>
  
  <p>If I use use <code>//= require bootstrap</code> instead of <code>//= require twitter/bootstrap</code> then it gives me <code>cannot load such file -- less (in home/alex/Documents/ruby_projects/pr1/app/assets/stylesheets/bootstrap_and_overr‌​ides.css.less)</code> despite the fact that the file exists.</p>
  
  <p>And if I rename <code>css.less to css</code>, then I get the next error <code>couldn't find file 'bootstrap_and_overrides' (in /home/alex/Documents/ruby_projects/pr1/app/assets/javascripts/application.js:15)‌​</code></p>