title: Opencv_photo not found Error, on installing opencv gem in rails 4?
body: <p>I am trying to install opencv gem in rails 4 application using the following command,</p>
  
  <pre><code>gem install ruby-opencv -- --with-opencv-dir=/usr/local
  </code></pre>
  
  <p>It is giving  opencv_photo not found error,</p>
  
  <p>ERROR:</p>
  
  <pre><code>Building native extensions with: '--with-opencv-dir=/usr/local'
  This could take a while...
  ERROR:  Error installing ruby-opencv:
      ERROR: Failed to build gem native extension.
  
  /home/vijaya/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb --with-opencv-dir=/usr/local
  &gt;&gt; Check the required libraries...
  
  checking for main() in -lstdc++... yes
  checking for main() in -lopencv_calib3d... yes
  checking for main() in -lopencv_contrib... yes
  checking for main() in -lopencv_core... yes
  checking for main() in -lopencv_features2d... yes
  checking for main() in -lopencv_flann... yes
  checking for main() in -lopencv_highgui... yes
  checking for main() in -lopencv_imgproc... yes
  checking for main() in -lopencv_legacy... yes
  checking for main() in -lopencv_ml... yes
  checking for main() in -lopencv_objdetect... yes
  checking for main() in -lopencv_video... yes
  checking for main() in -lopencv_photo... no
  *** extconf.rb failed ***
  Could not create Makefile due to some reason, probably lack of necessary
  libraries and/or headers.  Check the mkmf.log file for more details.  You may
  need configuration options.
  
  Provided configuration options:
      --with-opt-dir
      --without-opt-dir
      --with-opt-include
      --without-opt-include=${opt-dir}/include
      --with-opt-lib
      --without-opt-lib=${opt-dir}/lib
      --with-make-prog
      --without-make-prog
      --srcdir=.
      --curdir
      --ruby=/home/vijaya/.rvm/rubies/ruby-2.1.1/bin/ruby
      --with-opencv-dir
      --with-opencv-include
      --without-opencv-include=${opencv-dir}/include
      --with-opencv-lib
      --without-opencv-lib=${opencv-dir}/lib
      --with-libxml2-dir
      --without-libxml2-dir
      --with-libxml2-include
      --without-libxml2-include=${libxml2-dir}/include
      --with-libxml2-lib
      --without-libxml2-lib=${libxml2-dir}/lib
      --with-stdc++lib
      --without-stdc++lib
      --with-opencv_calib3dlib
      --without-opencv_calib3dlib
      --with-opencv_contriblib
      --without-opencv_contriblib
      --with-opencv_corelib
      --without-opencv_corelib
      --with-opencv_features2dlib
      --without-opencv_features2dlib
      --with-opencv_flannlib
      --without-opencv_flannlib
      --with-opencv_highguilib
      --without-opencv_highguilib
      --with-opencv_imgproclib
      --without-opencv_imgproclib
      --with-opencv_legacylib
      --without-opencv_legacylib
      --with-opencv_mllib
      --without-opencv_mllib
      --with-opencv_objdetectlib
      --without-opencv_objdetectlib
      --with-opencv_videolib
      --without-opencv_videolib
      --with-opencv_photolib
      --without-opencv_photolib
  extconf.rb:58:in `block in &lt;main&gt;': opencv_photo not found. (RuntimeError)
      from extconf.rb:58:in `each'
      from extconf.rb:58:in `&lt;main&gt;'
  
  extconf failed, exit code 1
  
  Gem files will remain installed in /home/vijaya/.rvm/gems/ruby-2.1.1@live/gems/ruby-opencv-0.0.13 for inspection.
  Results logged to /home/vijaya/.rvm/gems/ruby-2.1.1@live/extensions/x86_64-linux/2.1.0/ruby-opencv-0.0.13/gem_make.out
  </code></pre>
  
  <p>How to fix it?</p>
  
  <p>we are using </p>
  
  <p>ubuntu = 12.04</p>
  
  <p>Ruby Version = 2.1.1</p>
  
  <p>Rails Version = 4.1.0</p>
  
  <p>Can any one help me in fixing this issue?</p>