title: gem install of pdf-extract on Macports / Mac OS X Yosemite
body: <p>I am attempting to install <a href="https://github.com/CrossRef/pdfextract" rel="nofollow">pdf-extract</a> on Mac OS X Yosemite. I assume it's better not to use the <code>/usr/bin/ruby</code> that comes with Yosemite, so I'm using the Macports version, <code>/opt/local/bin/ruby</code> (ver2.1.3).</p>
  
  <p>The installation appears to go fine:</p>
  
  <pre><code>sudo port install ruby
  sudo port install rb-rubygems
  sudo port select --set ruby ruby21
  which ruby   #/opt/local/bin/ruby
  which gem    #/opt/local/bin/gem
  
  sudo gem install pdf-extract
  </code></pre>
  
  <p>At the end of the last command, the message appears to indicate that all went well:</p>
  
  <pre><code>...
  Done installing documentation for Ascii85, afm, commander, hashery, highline, libsvm-ruby-swig, mini_portile, nokogiri, pdf-core, pdf-extract, pdf-reader, prawn, ruby-rc4, sqlite3, ttfunk after 30 seconds
  15 gems installed
  </code></pre>
  
  <p>However, when I attempt to run pdf-extract, I ran into the following error:</p>
  
  <pre><code>$ cd bin/
  $ ./pdf-extract extract --titles journal.pdf
  /opt/local/lib/ruby2.1/gems/2.1.0/gems/commander-4.2.1/lib/commander/runner.rb:384:in `block in require_program': program version required (Commander::Runner::CommandError)
      from /opt/local/lib/ruby2.1/gems/2.1.0/gems/commander-4.2.1/lib/commander/runner.rb:383:in `each'
      from /opt/local/lib/ruby2.1/gems/2.1.0/gems/commander-4.2.1/lib/commander/runner.rb:383:in `require_program'
      from /opt/local/lib/ruby2.1/gems/2.1.0/gems/commander-4.2.1/lib/commander/runner.rb:51:in `run!'
      from /opt/local/lib/ruby2.1/gems/2.1.0/gems/commander-4.2.1/lib/commander/delegates.rb:8:in `run!'
      from /opt/local/lib/ruby2.1/gems/2.1.0/gems/commander-4.2.1/lib/commander/import.rb:10:in `block in &lt;top (required)&gt;'
  /private/tmp/pdfextract/lib/pdf/extract/references/score.rb:11:in `&lt;module:Score&gt;': uninitialized constant Libsvm::Model (NameError)
      from /private/tmp/pdfextract/lib/pdf/extract/references/score.rb:4:in `&lt;module:PdfExtract&gt;'
      from /private/tmp/pdfextract/lib/pdf/extract/references/score.rb:3:in `&lt;top (required)&gt;'
      from /private/tmp/pdfextract/lib/pdf/extract/references/references.rb:3:in `require_relative'
      from /private/tmp/pdfextract/lib/pdf/extract/references/references.rb:3:in `&lt;top (required)&gt;'
      from /private/tmp/pdfextract/lib/pdf/extract.rb:10:in `require_relative'
      from /private/tmp/pdfextract/lib/pdf/extract.rb:10:in `&lt;top (required)&gt;'
      from /private/tmp/pdfextract/lib/pdf-extract.rb:1:in `require_relative'
      from /private/tmp/pdfextract/lib/pdf-extract.rb:1:in `&lt;top (required)&gt;'
      from ./pdf-extract:5:in `require_relative'
      from ./pdf-extract:5:in `&lt;main&gt;'
  </code></pre>
  
  <p>My question is whether I've done the <code>gem install</code> correctly (and therefore it's probably a bug in <code>pdf-extract</code>) or whether I've messed up something in the installation (or in the file paths).</p>
  
  <p>Side note: the installation folder was initially <code>$HOME/Dropbox/code/ruby/pdf-extract</code>, but I carried out a <code>mv pdf-extract /tmp</code> (to shorten the file paths in the error messages) and re-ran the install scripts (the error message essentially remained the same). I also tried replacing <code>./pdf-extract</code> with <code>/opt/local/bin/ruby2.1 pdf-extract</code> but it did not help.</p>