overview / docs2csv

Scan a folder of document files of all types and extract the text into a CSV suitable for Overview
26 stars 6 forks source link

Dependency problem? #1

Open micahflee opened 10 years ago

micahflee commented 10 years ago

I'm trying to run docs2csv on the Wikileaks Afghanistan War Logs but running into this error. I installed all the dependencies in the README.md, but I suspect there might be some gems that I'm missing.

[micah@ove] ~/docs2csv$ ruby docs2csv.rb -r -o ~/wikileaks/afg/afg/event/ ~/afg.csv
/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- Digest (LoadError)
        from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
        from docs2csv.rb:11
adamhooper commented 10 years ago

Hi Micah,

Hey, that happens to me, too. What happens if you change "require 'Digest'" to "require 'digest'" and leave everything else in docs2csv.rb the same?

Enjoy life, Adam

On Thu, Dec 12, 2013 at 4:57 PM, Micah Lee notifications@github.com wrote:

I'm trying to run docs2csv on the Wikileaks Afghanistan War Logs but running into this error. I installed all the dependencies in the README.md, but I suspect there might be some gems that I'm missing.

[micah@ove] ~/docs2csv$ ruby docs2csv.rb -r -o ~/wikileaks/afg/afg/event/ ~/afg.csv /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require': no such file to load -- Digest (LoadError) from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:inrequire' from docs2csv.rb:11

— Reply to this email directly or view it on GitHubhttps://github.com/overview/docs2csv/issues/1 .

My Phone (mobile): +1 613 986 3339 My Website: http://adamhooper.com My Twitter: http://twitter.com/adamhooper

micahflee commented 10 years ago

Hey @adamhooper, that almost does it. I get a different error:

[micah@ove] ~/docs2csv$ ruby docs2csv.rb -r -o ~/wikileaks/afg/afg/event/ ~/afg.csv
/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- json (LoadError)
        from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
        from docs2csv.rb:17

But I did some googling and realized that it might work if I use ruby 1.9 instead of 1.8. On Ubuntu here's how to switch to 1.9:

sudo apt-get install ruby1.9.1
sudo update-alternatives --set ruby /usr/bin/ruby1.9.1

If I'm running both ruby 1.9 and also change require 'Digest' to require 'digest', then it works successfully.

jstray commented 10 years ago

I think you can just remove json. Dead code.

On Thursday, December 12, 2013, Micah Lee wrote:

Hey @adamhooper https://github.com/adamhooper, that almost does it. I get a different error:

[micah@ove] ~/docs2csv$ ruby docs2csv.rb -r -o ~/wikileaks/afg/afg/event/ ~/afg.csv /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require': no such file to load -- json (LoadError) from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:inrequire' from docs2csv.rb:17

But I did some googling and realized that it might work if I use ruby 1.9 instead of 1.8. On Ubuntu here's how to switch to 1.9:

sudo apt-get install ruby1.9.1 sudo update-alternatives --set ruby /usr/bin/ruby1.9.1

If I'm running both ruby 1.9 and also change require 'Digest' to require 'digest', then it works successfully.

— Reply to this email directly or view it on GitHubhttps://github.com/overview/docs2csv/issues/1#issuecomment-30467467 .