mailcatcher icon indicating copy to clipboard operation
mailcatcher copied to clipboard

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

Open jai-x opened this issue 2 years ago • 6 comments

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?

jai-x avatar Jul 05 '22 12:07 jai-x

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

sj26 avatar Jul 05 '22 12:07 sj26

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

jai-x avatar Jul 05 '22 12:07 jai-x

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.

sj26 avatar Jul 09 '22 00:07 sj26

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

@sj26 this appers to have the same problem?

alistairholt avatar Aug 11 '22 12:08 alistairholt

@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.

sj26 avatar Aug 15 '22 00:08 sj26

@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

alistairholt avatar Aug 15 '22 09:08 alistairholt

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

mlensment avatar Jan 14 '23 23:01 mlensment

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

ivopavlov87 avatar Jan 28 '23 21:01 ivopavlov87

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

sj26 avatar Jan 29 '23 23:01 sj26