se3000 / ruby-eth

Gem for creating and signing Ethereum transactions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Class error when deploying to heroku

mvanh opened this issue · comments

superclass mismatch for class Digest::SHA3 (Digest::Class is given but was Digest::Base) when used in a project and deployed to heroku

What version of ruby are you using?

I need to investigate more, but I believe that this is an error with the sha3 repo. I believe that it no longer works with ruby 2.5+. Looks like that repo is unmaintained, so we'll probably have to fork it... probably going to take some time. I think the best immediate workaround is to switch to ruby 2.4.

As [mentioned here](bundle config build.digest-sha3 --with-cflags="-Wno-format-security"), there is a workaround that you can add to your Gemfile:

git 'https://github.com/izetex/digest-sha3-ruby' do
  gem 'digest-sha3'
end

I've verified the above works on the latest Heroku stack, heroku-18. Alternatively, if you're just building locally and not deploying to Heroku, you can run bundle config build.digest-sha3 --with-cflags="-Wno-format-security" before running bundle install.

Closing this for now. Feel free to reopen if you run into it.