Reputation: 1004
Problem: my Rails app won't deploy on Heroku (Timed out compiling Ruby app (15 minutes)
) because of assets precompilation.
I use gems (asset_sync, sprockets-image_compressor, image_optim) that cause slow asset precompilation. I also sync my assets to store them on S3. I had not have this issue before adding sprockets-image_compressor and image_optim gems
I could precompile assets locally but I would have to deal with my multiple environments (I have a staging app and a production app and I store my assets on different bucket on S3 regarding the environment) and I don't want to do that. And anyway that should be handled on deployment on Heroku.
I've also opened a ticket on Heroku asking them to increase the time out but I doubt they'll do that.
Any idea, suggestions?
Upvotes: 3
Views: 413
Reputation: 43
I have this same issue, and also using image_optim gem. Basically the image precompilation process takes too long. So I modified Gemfile. Changed:
gem 'image_optim'
To:
gem 'image_optim', :group => [:development]
Now I can precompile remotely on Heroku :D. Oh, this solution works pretty good for me since I compress all images manually using image_optim -r *
in the folder where images are. And then push all image optimizations to my repository.
Cheers!
Upvotes: 2