sj26 / mailcatcher

Catches mail and serves it through a dream.
http://mailcatcher.me
MIT License
6.23k stars 571 forks source link

Update gem `thin` to version >`1.8.0` to resolve installation issues #512

Closed jai-x closed 1 year ago

jai-x commented 2 years ago

Gem thin is required by mailcatcher and is specified within a minor version of v1.5.0: https://github.com/sj26/mailcatcher/blob/30b10049b806a64d1c12419574334f6bd1634223/mailcatcher.gemspec#L42

The installation of gem thin requires a workaround that is documented in the readme:

If you encounter issues installing thin, try: gem install thin -v 1.5.1 -- --with-cflags="-Wno-error=implicit-function-declaration"

These issues have since been resolved in https://github.com/macournoyer/thin/pull/364 and the fix is available since version v1.8.0.

Is it possible to upgrade the thin dependency or are there any blocking requirements to keep the version as is?

sj26 commented 2 years ago

Yes there were/are a few issues preventing the upgrade. They are being worked through. Please use the documented workaround in the meantime.

jai-x commented 2 years ago

Thanks for the response. Of the remaining work required to upgrade, is any of it documented anywhere such that people can contribute towards helping?

sj26 commented 2 years ago

No, it is not.

If you'd like to help, please try the latest pre-release version which has swapped out the websocket library which was preventing upgrade:

gem install --pre mailcatcher

If you find any issues please report them.

alistairholt commented 1 year ago

gem install --pre mailcatcher => mailcatcher-0.9.0.beta1

@sj26 this appers to have the same problem?

sj26 commented 1 year ago

@alistairholt could you please be more specific?

The beta doesn't upgrade thin, it changes the websocket integration. I'd like to see that stable before committing to upgrading thin.

alistairholt commented 1 year ago

@sj26 sure. When I tried the beta I still got the same error from thin on install:

s.add_dependency "thin", "~> 1.5.0" in mailcatcher.gemspec

mlensment commented 1 year ago

I was struggling with installing thin for an entire night, finally I figured out I had to add "-fdeclspec" flag. I'm still running Mac OS Catalina with xcode 12.2, ruby 3.1.0 installed via rbenv.

Maybe someone finds it useful. gem install thin -v 1.5.1 -- --with-cflags="-Wno-error=implicit-function-declaration -fdeclspec" gem install mailcatcher -N

Inspiration: https://github.com/nginx/unit/issues/653

ivopavlov87 commented 1 year ago

Had this issue. Did not need the -fdeclspec flag.

Just had to do: gem install thin -v '1.5.1' -- --with-cflags="-Wno-error=implicit-function-declaration" then was able to do: gem install mailcatcher

Qiita Source. This is a Japanese site; I used Google Translate to read. I did not need to use sudo. Translated Qiita Source.

StackOverflow Source.

System details: MacBook Pro 16-inch 2021 Apple M1 Max 32 GB Memory macOS Ventura 13.2

sj26 commented 1 year ago

I have pushed another pre-release, v0.9.0.beta2, which relaxes the thin requirement and should support ruby 3.2. Please try it:

gem install mailcatcher --pre