0

I am working through Michael Hartl's Rails tutorial, and after including a bootstrap gem I cannot get the formatting to work when I push to Heroku. Everything looks great on localhost:3000.

Here's my gemfile:

source 'https://rubygems.org'
ruby '1.9.3'
#ruby-gemset=railstutorial_rails_4_0

gem 'rails', '4.0.0'
gem 'bootstrap-sass', '2.3.2.0'
gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '1.1.2'
gem 'will_paginate', '3.0.4'
gem 'bootstrap-will_paginate', '0.0.9'

And here is the beginning of my stylesheet:

@import "bootstrap";

/* mixins, variables, etc. */

$grayMediumLight: #eaeaea;

/* universal */

Not sure if the issue is in either of these places, so here is my git repository https://github.com/ajhausdorf/sample_app

2 Answers 2

1

Before deploying to Heroku, you need to precompile assets:

rake assets:precompile

He explains this in Section 1.4.1 Heroku setup - Listing 1.9.

0

Another alternative is to enable Rail's static asset server (in production.rb).

config.serve_static_assets = true

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.