Mailcatcher gem installation issue on MacOS Catalina and its solution

I faced this issue a few weeks back and was able to resolve it in the following manner.
The mailcatcher gem as of writing this depends on thin-1.5.1 which doesn’t install correctly.

Now, if you face the issue, uninstall the thin gem. Then,

gem install thin -v 1.5.1 -- --with-cflags="-Wno-error=implicit-function-declaration"
gem install mailcatcher

And you should be good to go.

Here’s the StackOverflow link I followed with some tweaks.


Discourse actually is very happy to fund up to say $3000 dollars for a mailcatcher rewrite/fork that junks event machine and replaces it with @ioquatix async and family instead. (and allowing this to work with say puma instead of thin)

At the moment mailcatcher is stuck on an old version of event machine, and the community has mostly moved on from using event machine.

If you or anyone is interested contact me via a PM.

End result of the work is

  • Remove mailcatcher gem
  • Add new gem to Discourse
  • Everything works exactly the same dev wise as it used to

Also prior to forking the gem I would recommend a PR to mailcatcher the de-event machines it… and to discuss with the maintainer.


Hiya! I’m the maintainer of mailcatcher. I’ve had my eye on moving to async for quite a while because there are several systemic problems rooted in eventmachine holding the gem back which async would solve. There are event a couple of sandbox async branches. But it’s also worked well enough in its current form and so it’s never been worthwhile to invest in the rewrite. Operating system and Ruby changes are becoming a forcing function, though, and so if somebody has time and capability to tackle the refactor to async then I’d support such an effort. Happy to discuss via email, PM, or on GitHub.


Howdy Samuel,

One thing we did with a few other projects is set up “GitHub” funding. In the past GitHub matched the donations up to 5k. GitHub launches Sponsors, lets you pay your favorite open-source contributors – TechCrunch I am not sure if that is still the case.

Regardless we could set up a 1k donation here for the next 3 months.

Do you feel that would be enough to push the work forward? Do you have time to work on this?