Heroku pipeline release deducts error while on deployment

19 Views Asked by At

I have been trying to deploy rails4 and ruby 2.6.5 version in to Heroku pipeline. It gives following error during release step.

Error Trace

Running release command...
bundler: failed to load command: rake (/app/vendor/bundle/ruby/2.6.0/bin/rake)
LoadError: library not found for class Digest::SHA1 -- digest/sha1
  /app/vendor/ruby-2.6.5/lib/ruby/2.6.0/digest.rb:16:in `const_missing'
  /app/vendor/ruby-2.6.5/lib/ruby/2.6.0/digest.rb:100:in `block in Digest'
  /app/vendor/ruby-2.6.5/lib/ruby/2.6.0/digest.rb:98:in `synchronize'
  /app/vendor/ruby-2.6.5/lib/ruby/2.6.0/digest.rb:98:in `Digest'
  ...........
2

There are 2 best solutions below

0
Saqib Shahzad On

I believe you will have to add gem 'digest' to your Gemfile and run bundle install and then deploy again to Heroku.

https://github.com/ruby/digest

0
Nuclearman On

For Rails 4.2, you need to use heroku-20 and Ruby 2.7 or higher. I've found that 2.7.8 seems to work without too much trouble.

The heroku-22 stack requires Ruby 3.0 (might even be higher than 3.0) or higher and I doubt you can get Rails 4.2 working on that.