Heroku deployment timeout due to precompiled assets
Problem: My Rails app won't deploy to Heroku ( Timed out compiling Ruby app (15 minutes)
) due to resource pre-compilation.
I am using gems (asset_sync, sprockets-image_compressor, image_optim) which cause slow pre-compilation. I also sync my assets to store them on S3. I didn't have this problem before adding sprockets-image_compressor and image_optim gems
I could precompile resources locally, but I would have to deal with my multiple environments (I have a staging application and a production application and I store my assets in different buckets on S3 in relation to the environment) and I don't want to do that. And it still needs to be handled when deploying to Heroku.
I also opened a ticket to Heroku asking for more wait times, but I doubt they will.
Any idea, suggestions?
source to share
I have this same problem and also using the image_optim gem. Basically, the image pre-compilation process takes too long. So I modified the Gemfile. Changed:
gem 'image_optim'
To:
gem 'image_optim', :group => [:development]
Now I can pre-link on Heroku: D. Oh, this solution works really well for me as I compress all the images manually using image_optim -r *
the folder where the images are located. And then push all image optimizations to my repository. Hooray!
source to share