warning: already initialized constant APP_PATH
1
Not solved Solved
8 months ago

I offer a bottle of champagne to the one helping me fix this one :)


I installed the tesseract-ocr gem recently, and it broke something...

When trying to rails s i now receive an error saying:

bin/rails:6: warning: already initialized constant APP_PATH
/Users/bricemaurin/code/deuxio/superapp/bin/rails:6: warning: previous definition of APP_PATH was here

After searching for this issue on stackoverflow / the web, i understand that

  1. It seems that there's an open issue with the latest tesseract version
  2. stackoverflow recommends downgrading to the previous one

but...when trying to install the previous version it returns another error:

brew install https://raw.githubusercontent.com/Homebrew/homebrew/8ba134eda537d2cee7daa7ebdd9f728389d9c53e/Library/Formula/tesseract.rb

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
No changes to formulae.

######################################################################## 100.0%
Error: Calling Resource#sha1 is disabled!
Use Resource#sha256 instead.
/Users/bricemaurin/Library/Caches/Homebrew/Formula/tesseract.rb:123:in `block (2 levels) in <class:Tesseract>'

Did anyone face this issue in the past ??

I'm lost...

Thanks a lot !

Cancel
Submit your answer