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 Hartl and Rails guides. I have deployed an app to Heroku, but I get this error while 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’ end

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

group :production do gem ‘pg’ end

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 runtimes

gem ‘therubyracer’

gem ‘uglifier’, ‘>= 1.0.3’ end

gem ‘jquery-rails’

The thing I don’t understand is that there are no bootstrap related css or 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.

Thanks, Manoj.