Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails configuration failed on Heroku deploy

I have read through all the comments and issues I can find here, but none of them seem to apply to my situation. I have a Ruby on Rails back-end, with React front-end that was deploying fine until I added the ability for an admin to update databases via a CSV file using ActiveRecord.

When I push to Heroku, I now get two warnings:

###### WARNING: Detecting rails configuration failed
##### WARNING: We detected that some binary dependencies required to use all the preview features of Active Storage are not present on this system.

I have gone through the provided Heroku articles on active storage on Heroku, but I am still not able to solve the problem.

Trying to trouble shoot on the Rails console, I get the following error that might be the culprit:

/app/vendor/bundle/ruby/2.5.0/gems/aws-partitions-1.144.0/lib/aws-partitions/endpoint_provider.rb:82:in block in partition_matching_region: Cannot load Rails.config.active_storage.service: (NoMethodError) undefined method match for nil:NilClass

Does anybody have any insight into this problem? I am running into the same stuff that others are discovering: some of these error messages are not the most insightful for me. Thank you!

like image 704
Michael Bach Avatar asked Oct 17 '22 05:10

Michael Bach


1 Answers

You need to install Heroku's ActiveStorage Previews Buildpack:

heroku buildpacks:add -i 1 https://github.com/heroku/heroku-buildpack-activestorage-preview

This will install the binary tools necessary to generate the asset previews. More information is available here:

  • https://blog.heroku.com/rails-active-storage
  • https://github.com/heroku/heroku-buildpack-activestorage-preview
like image 80
infused Avatar answered Oct 21 '22 00:10

infused