Issue while deploying to heroku with Rails 3.2.1, ruby 1.9.3-p0, using twitter-bootstrap


I am new to Rails and am following Rails tutorials by Michael H. and
Rails guides. I have deployed an app to Heroku, but I get this error
trying to access it (from heroku logs) -

Completed 500 Internal Server Error in 79ms
<%= stylesheet_link_tag “application”, :media => “all” %>
ActionView::Template::Error (application.css isn’t precompiled)

I want to use Twitter Bootstrap and have followed the instructions
mentioned here -
The contents of my Gemfile are -

gem ‘rails’, ‘3.2.1’

Bundle edge Rails instead:

gem ‘rails’, :git => ‘git://’

group :development, :test do
gem ‘sqlite3’
gem ‘heroku’
gem ‘rspec-rails’
gem ‘twitter-bootstrap-rails’
gem ‘annotate’, ‘~> 2.4.1.beta1’

group :test do
gem ‘webrat’, ‘0.7.1’

group :production do
gem ‘pg’

Gems used only for assets and not required

in production environments by default.

group :assets do
gem ‘sass-rails’, ‘~> 3.2.3’
gem ‘coffee-rails’, ‘~> 3.2.1’

See for more supported

gem ‘therubyracer’

gem ‘uglifier’, ‘>= 1.0.3’

gem ‘jquery-rails’

The thing I don’t understand is that there are no bootstrap related css
js files in /vendor/assets /javascripts or /stylesheets folder.
I see and bootstrap.css.less in /app/assets
/javascripts and /stylesheets folders respectively.

I also added the below code to my /config/application.rb file -


config.assets.precompile += %w( bootstrap.css )
config.assets.precompile += %w( application.css )

My app works fine on my dev machine, but I get the above error after
deployment to Heroku.

Please let me know what I am missing.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs