Rails + Twitter Bootstrap: File to import not found or unreadable: twitter/bootstrap Rails + Twitter Bootstrap: File to import not found or unreadable: twitter/bootstrap ruby ruby

Rails + Twitter Bootstrap: File to import not found or unreadable: twitter/bootstrap


we had the same problem, i just restarted the rails server and it worked


If you already attempted to shut down the server and restart it, then your problem may be the cached css file that is generated from your sass file. The reason for this may be some varient of live reload which pre-renders several of the scss/haml type files. If that isn't the case then

  1. Read the error message and determine the scss file that is causing the error.
  2. Locate the css file that is generated along the sass file, (i.e. custom.css.scss would generate custom.css).
  3. Delete that file, refresh the page and if this files delete the entire cache found under assets/stylesheets and temp/cache)


For some reason I had to explicitly require the gem to get it working. As suggested in this github issue comment to fix a similar error with bootstrap-sass, it's likely the gem is not loaded automatically. Add require "twitter-bootstrap-rails to e.g config/application.rb file to explicitly require it.