chruby homebrew and native extensions fail…

I always try to run the latest version of ruby, via chruby and ruby-build.
Recently I ran into a wierd issue, and I’m not really sure how to resolve it,
yet, but managed to work around it. When installing gems with native extensions
via bundler, ruby seems to not find libraries installed via homebrew, it works
fine just running gem install so. Also all extensions installed
seem to stop working between ruby 2.1.0 and 2.1.1. Even though I don’t know
what’s going on, the work around seems to be installing all gems which have
native extensions via gem install GEM and running bundle
after the fact. Now everything works again…

Installing Couchbase sync_gateway via Homebrew

Homebrew is my favorite package manager on the Mac, sadly
there is no package to setup and install the Couchbase
which is used for
interaction between a Couchbase
and a Couchbase Lite
mobile database
. Since
this is easily fixed, I created a formula for sync_gateway. Currently the
Pull-Request is still open so
if you like to have this in homebrew make sure to let the homebrew maintainers
know. For the time being you can install it by referencing my fork of homebrew
directly in the brew install.

brew install

Patching Vim via Homebrew to fix YouCompleteMe error messages ‘Back to original’

One of the plugins for vim I rely on heavily is
YouCompleteMe. It really is amazing
but there is one small problem as it generates completion error messages all the
time while typing.

There is a fix for
which sadly has
not landed in Vim yet, but as detailed in the issue on
it is easy to
patch it yourself. Since I installed vim via Homebrew the way to go was to add
the patch to the Homebrew formula and go from there. So this is what I did.
First I don’t like to work in the Homebrew master so I created a new branch

$ cd `brew --prefix`
$ git checkout -b add-ycm-message-silence-patch
$ vim Library/Formula/vim.rb

Afterwards it’s time to put the new patch in the formula, at the bottom of the
file after __END__. The method

def patches; DATA; end unless build.head?

will apply all patches preset in the DATA section, which is the part of the file after
__END__. I created a version in my fork of homebrew.

And low and behold after a reinstall

$ brew uninstall vim
$ brew install vim --override-system-vi 
  --with-client-server --with-lua 
  --with-mzscheme --with-perl --with-tcl

The annoying errors are gone.