First of all, install OpenCV v2:
$ brew install opencv@2
Then, set build configuration for build (changing OpenCVversion number for the current one):
$ bundle config build.ruby-opencv --with-opencv-lib=/usr/local/Cellar/opencv@2/2.4.13.6_2/lib \