Precompile not working
I'm on Heroku, in case that matters.
Following the docs, I have added config.deface.enabled = false to production.rb.
Then, I deployed to heroku, and ran heroku run rake deface:precompile.
This command outputs a ton of No :original defined for warnings, and a few The original source for 'blah_blah' has changed, this override should be reviewed to ensure it's still valid. errors.
All of my deface overrides work well in development. Also, before attempting to configure precompiling, deface overrides worked well in production.
Any ideas? I'd love to avoid precompiling in development and pushing those precompiled templates.
@jpdesigndev I need some steps to reproduce this problem! What version of Spree? Do you have an app that I can clone and attempt this deployment to Heroku that should give me the same error?
Coming right up! Let me try to come up with something. The store itself isn't open source.
Here's my gemfile with a few custom extensions removed because some are private, loaded via git submodule, and I was afraid they would complicate things. In case you need access to those, let me know, and I'll see what I can do. Spree 2.1-stable (2.1.4 d4c3954)
- I'm adding
config.deface.enabled = falseto production.rb - Committing and pushing
- Check that deface overrides aren't applied (they shouldn't be yet, they aren't)
- Run
heroku run bundle exec rake deface:precompile - Check that deface overrides are being applied (they should be now, but still aren't)
- As an attempt to debug, precompile the deface overrides locally (they are, and work)
source 'https://rubygems.org'
ruby '2.0.0'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'
# Use Postgresql 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
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
gem 'pry', group: :development
gem 'rails_12factor', group: :production
# Use debugger
# gem 'debugger', group: [:development, :test]
gem 'compass-rails', '~> 1.1.0.pre'
# gem 'foundation-rails', github: "zurb/foundation-rails", tag: "v5.0.2.0"
gem 'foundation-rails', :git => "https://github.com/FylmTM/foundation-rails.git", :branch => "turbolinks-fix"
gem 'spree', :git => 'https://github.com/spree/spree.git', :branch => '2-1-stable'
gem 'spree_gateway', :git => 'https://github.com/spree/spree_gateway.git', :branch => '2-1-stable'
gem 'spree_auth_devise', :git => 'https://github.com/spree/spree_auth_devise.git', :branch => '2-1-stable'
# Spree Extensions
gem 'spree_static_content', :github => 'spree/spree_static_content', :branch => '2-1-stable'
gem 'spree_paypal_express', :github => "radar/better_spree_paypal_express", :branch => "2-1-stable"
gem 'unicorn'
hey @jpdesigndev does heroku tell you anything after running that rake task?
I'm not a heroku user but do they let you write to the app/ dir? Maybe theres a chance you're not compiling at all there? just a thought
Hey @huoxito, thanks for getting back to me. Heroku throws a ton of Deface warnings and a few errors like a mentioned before, but nothing else related. These deface warnings and such actually litter the crap out of my logs on almost every request as well.
Edit: I'm really not sure about writing to app dir, but I assume they do. I can't find anything saying they don't allow this.