spree_fancy
spree_fancy copied to clipboard
Heroku compatibility
It seems there is a problem with latest version of the gem and deployment to heroku. https://github.com/Compass/compass-rails/issues/19 One of workaround is to set
config.assets.initialize_on_precompile = false
However, it doesn't work with spree initialisers. And it doesn't look like compass-rails & compass are inside assets group either...
Can you please write compleate guide to reproduce this bug by steps. Thanks!
I have created a sample repo https://github.com/Maxim-Filimonov/spree_fancy_issue_2_sample Read commits for details. Basically it's an empty rails app with spree and spree fancy installed via gemfile. The only non standard thing it that I removed the spree_fancy migrations because it's not easy to run them as part of db migrate on heroku. To test it clone the repo then do the following
heroku create
git push heroku master
heroku run rake db:bootstrap
If you try to access the app on in your browser using heroku open
command. You will get an error. To see the error run heroku logs -n 300
Somewhere in logs you should find the following
ActionView::Template::Error (store/print.css isn't precompiled):
Let me know if you need more info on any step.
I was able to resolve this by adding the line config.assets.precompile += %w( store/print.css )
to application.rb, so it should look like:
config.assets.initialize_on_precompile = false config.assets.precompile += %w( store/print.css )
and then just precompile the assets locally:
RAILS_ENV=production bundle exec rake assets:precompile
and then it should deploy to Heroku.
Then you need to precompile assets before you deploy every time you change them. Yes, I can do a rake task for this but I would rather avoid it and precompile on heroku side. On 10/02/2013, at 5:34 AM, Michael Chau [email protected] wrote:
I was able to resolve this by adding the line config.assets.precompile += %w( store/print.css ) to application.rb, so it should look like:
config.assets.initialize_on_precompile = false config.assets.precompile += %w( store/print.css ) and then just precompile the assets locally:
RAILS_ENV=production bundle exec rake assets:precompile and then it should deploy to Heroku.
— Reply to this email directly or view it on GitHub..
gem 'spree_fancy', :github => 'spree/spree_fancy', :branch => '1-3-stable'
I had to add this precompile line to the production.rb, works without having to precompile locally.
config.assets.precompile += %w( store/shared/_print.css )