
At work I am going to work on an older rails project… Like many other Rails projects, this one can only run on older versions of ruby. Hence I install rbenv and tried my luck.
My luck failed though and I had some issues installing “thin” gem which is used with “mailcatcher” gem.
Eventually I found this post, which helped my Mac compile the thin gem file with native extensions:
Long story short:
install the gem separately with custom compiler flags and run bundler install again.
rbenv exec gem install thin -v 1.5.1 -- --with-cflags="-Wno-error=implicit-function-declaration"
At last i can run rbenv exec bundler install
and the rest of the installation can begin.