Forum: Ruby problem in installing tesseract

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
73700e119917433681f2e8f3e4369f74?d=identicon&s=25 Li CN (alex-osu3)
on 2017-04-08 07:00
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:in
`require'
from ts.rb:1:in `<main>'
>Exit code: 1


I wonder how to solve this problem.

Thanks,
4828d528e2e46f7c8160c336eb332836?d=identicon&s=25 Robert Heiler (shevegen)
on 2017-04-09 00:12
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?
73700e119917433681f2e8f3e4369f74?d=identicon&s=25 Li CN (alex-osu3)
on 2017-04-09 00:46
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:
     - https://rubygems.org/
  - 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>
73700e119917433681f2e8f3e4369f74?d=identicon&s=25 Li CN (alex-osu3)
on 2017-04-11 14:24
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>
This topic is locked and can not be replied to.