Problem in installing tesseract

Hi all,

I want to play around with tesseract.

I use “gem install tesseract” and it looks like it is installed
successfully as follow:

ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32]

C:\Users\alex>gem install tesseract
Fetching: tesseract-0.1.0.gem (100%)
Successfully installed tesseract-0.1.0
Parsing documentation for tesseract-0.1.0
Installing ri documentation for tesseract-0.1.0
Done installing documentation for tesseract after 0 seconds
1 gem installed

But when I run a small script to check if it works, I get this message:

ruby ts.rb
C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in
require': cannot load such file -- tesseract (LoadError) from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire’
from ts.rb:1:in `’
Exit code: 1

I wonder how to solve this problem.

Thanks,

This should not happen.

Does “gem env” output the right paths?

And did you install into a default directory or specified another one?
It should not matter but still.

Do you have only problem with tesseract or do other gems also not work
when you require them from within irb?

  1. How do I know that “gem env” output the right paths?

  2. I require ‘pp’ and the terminal looks like this
    C:\Users\alex>irb
    irb(main):001:0> require ‘pp’
    => true
    irb(main):002:0> pp ‘abc’
    “abc”
    => “abc”
    irb(main):003:0>

  3. I install it via gem. So I guess it will install into default folder.
    This is what I see after “gem env”. I am not sure if it outputs the
    right path.

ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32]

C:\Users\alex>gem env
RubyGems Environment:

  • RUBYGEMS VERSION: 2.5.2
  • RUBY VERSION: 2.3.3 (2016-11-21 patchlevel 222) [x64-mingw32]
  • INSTALLATION DIRECTORY: C:/Ruby23-x64/lib/ruby/gems/2.3.0
  • USER INSTALLATION DIRECTORY: C:/Users/alex/.gem/ruby/2.3.0
  • RUBY EXECUTABLE: C:/Ruby23-x64/bin/ruby.exe
  • EXECUTABLE DIRECTORY: C:/Ruby23-x64/bin
  • SPEC CACHE DIRECTORY: C:/Users/alex/.gem/specs
  • SYSTEM CONFIGURATION DIRECTORY: C:/ProgramData
  • RUBYGEMS PLATFORMS:
    • ruby
    • x64-mingw32
  • GEM PATHS:
    • C:/Ruby23-x64/lib/ruby/gems/2.3.0
    • C:/Users/alex/.gem/ruby/2.3.0
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :backtrace => false
    • :bulk_threshold => 1000
  • REMOTE SOURCES:
  • SHELL PATH:
    • C:\Ruby23-x64\bin
    • C:\ProgramData\Oracle\Java\javapath
    • C:\Program Files (x86)\Intel\iCLS Client\
    • C:\Program Files\Intel\iCLS Client\
    • C:\windows\system32
    • C:\windows
    • C:\windows\System32\Wbem
    • C:\windows\System32\WindowsPowerShell\v1.0\
    • C:\Program Files (x86)\Windows Live\Shared
    • C:\Program Files\Intel\Intel(R) Management Engine Components\DAL
    • C:\Program Files\Intel\Intel(R) Management Engine Components\IPT
    • C:\Program Files (x86)\Intel\Intel(R) Management Engine
      Components\DAL
    • C:\Program Files (x86)\Intel\Intel(R) Management Engine
      Components\IPT
    • C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86
    • C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64
    • C:\Users\alex\AppData\Local\Smartbar\Application\
    • C:\Ruby23-x64\bin
    • C:\WINDOWS\system32
    • C:\WINDOWS
    • C:\WINDOWS\System32\Wbem
    • C:\WINDOWS\System32\WindowsPowerShell\v1.0\
    • C:\Program Files (x86)\Skype\Phone\
    • C:\Pik
    • C:\Ruby23-x64\bin
    • C:\Tcl\bin
    • C:\Ruby200-x64\bin
    • C:\ProgramData\Oracle\Java\javapath
    • C:\Program Files (x86)\Intel\iCLS Client\
    • C:\Program Files\Intel\iCLS Client\
    • C:\windows\system32
    • C:\windows
    • C:\windows\System32\Wbem
    • C:\windows\System32\WindowsPowerShell\v1.0\
    • C:\Program Files (x86)\Windows Live\Shared
    • C:\Program Files\Intel\Intel(R) Management Engine Components\DAL
    • C:\Program Files\Intel\Intel(R) Management Engine Components\IPT
    • C:\Program Files (x86)\Intel\Intel(R) Management Engine
      Components\DAL
    • C:\Program Files (x86)\Intel\Intel(R) Management Engine
      Components\IPT
    • C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86
    • C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64
    • C:\Users\alex\AppData\Local\Smartbar\Application\
    • C:\Ruby23-x64\bin
    • C:\WINDOWS\system32
    • C:\WINDOWS
    • C:\WINDOWS\System32\Wbem
    • C:\WINDOWS\System32\WindowsPowerShell\v1.0\
    • C:\Program Files (x86)\Skype\Phone\

C:\Users\alex>

Hi all,

My problem is solved—by typing rtesseract instead of tesseract.

C:\Users\alex>irb
irb(main):001:0> require ‘rtesseract’
=> true
irb(main):002:0>