romanbsd / heroku-deflater

Enable gzip compression on heroku, but don't compress images.
MIT License
359 stars 62 forks source link

Error when deploying with no sprockets #52

Open AlecRust opened 4 years ago

AlecRust commented 4 years ago

When I add this gem and deploy to Heroku I get the error:

  rake aborted!
       NoMethodError: undefined method `assets' for #<Rails::Application::Configuration:0x000056068bb95090>

I assume this is because Asset Pipeline/sprockets is disabled in my app?

I only use webpacker. Any chance this gem can handle no Sprockets?

ryanfb commented 3 years ago

Just ran into this myself. It looks like it was fixed in f89bec4f6676fe13f39b962380b60279f641f53e, but no release has been cut which includes that commit. If you want to get around it you can use git as the source in your Gemfile, e.g.: gem 'heroku-deflater', git: 'https://github.com/romanbsd/heroku-deflater.git'