Coffeescript Not Updating in Heroku

Viewed 358

So, I've made a few changes to my web app that's hosted on Heroku and then I did my usual

git add .
git commit -m
git push
git push heroku

There were no errors during any of those commands... But then when I check the website, it seems like all the changes got pushed except for the changes in my Coffeescript file. And when I look at the source code of the webpage, I see the old JS code... It's like it skipped the changes in the coffeescript file. There were no errors in the push and the coffee script file was in the list of files when I did the commit.

Here's what I've tried so far:

  1. Add to my gemfile

    gem 'therubyracer'

  2. Add to Production.rb: config.assets.compile = true config.assets.initialize_on_precompile = true

  3. Restarted Heroku server

  4. Deleted my browser data...

None of this worked. Someone please help or point me in the right direction.

This is my Gemfile:

source 'https://rubygems.org'
ruby "2.2.1"
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.4'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
gem 'bootstrap-sass', '~> 3.3.6'
gem 'sprockets-rails'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'gon'
group :development, :test do
gem 'byebug'
end

group :development do
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
gem 'web-console', '~> 2.0'
gem 'spring'
end

group :production do
gem 'pg',             '0.17.1'
gem 'rails_12factor', '0.0.2'
gem 'puma',           '2.11.1'
gem 'therubyracer'
end

And this is production.rb File:

Rails.application.configure do
  config.cache_classes = true

  config.eager_load = true

  config.consider_all_requests_local       = false
  config.action_controller.perform_caching = true

  config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?

  config.assets.js_compressor = :uglifier

  config.assets.compile = true
  config.assets.initialize_on_precompile = true
  config.assets.digest = true
  config.log_level = :debug
  config.i18n.fallbacks = true

  config.active_support.deprecation = :notify

  config.log_formatter = ::Logger::Formatter.new
  config.active_record.dump_schema_after_migration = false
end

Thanks!

1 Answers
Related