Starkers
Starkers

Reputation: 10551

Heroku app has differences to local repository

My app looks really nice on my computer. I add it to a repo git add ., git commit -m 'create app' and push this repo up to heroku with git push heroku master. It looks identical to my local repository, and I expect nothing less.

But I've pushed my code again, and now there's all kinds of weirdness. Blue fonts that aren't present in the original, bootstrap breakpoints not working. A bit of a nightmare really. Git assures me everything is up to date, and yet the local repo is flawless, and the one running on heroku barely functional (the html, at least).

What are some reasons for this? My guess is that there may be some lingering stylesheets in the heroku remote that I've deleted locally. How can I make sure my heroku repo is utterly, utterly identical (including deleted files) to my local repo?

My Gemfile:

source 'https://rubygems.org'
gem 'flexslider'
gem 'font-awesome-rails'
gem 'rails_12factor', group: :production

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'

# Use sqlite3 as the database for Active Record
gem 'pg'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

gem 'ruby'
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

blue text

Any git tricks welcome!

Upvotes: 1

Views: 112

Answers (1)

Try to precompile your assets.

rake assets:precompile RAILS_ENV=production

Upvotes: 3

Related Questions