Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load Error Ruby23/lib/ruby/gems/2.3.0/gems/ibm_db-4.0.0-x86-mingw32/lib/mswin32/rb2x/i386/ibm_db.so (LoadError) #83

Open
ejakubowski opened this issue Feb 26, 2019 · 7 comments

Comments

@ejakubowski
Copy link

@ejakubowski ejakubowski commented Feb 26, 2019

Hello,
I'm trying to run a simple connection test with the ibm_db lib on windows 10 and it keeps failing with the following error.

C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire': 126: The specified module could not be found. - C:/Ruby23/lib/ruby/gems/2.3.0/gems/ibm_db-4.0.0-x86-mingw32/lib/mswin32/rb2x/i386/ibm_db.so (LoadError)
from C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/ibm_db-4.0.0-x86-mingw32/lib/mswin32/ibm_db.rb:90:in <top (required)>'
from C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in require' from C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in rescue in require'
from C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in require' from db2_test.rb:12:in

'
`

Example code:

`require 'rubygems'
require 'mswin32/ibm_db'

conn = IBM_DB.connect("sample", "db2inst1", "mypassword")
`

System Info:
Rails 5.2.2
ruby 2.3.3p222 (2016-11-21 revision 56859) [i386-mingw32]
Windows 10 x64
ibm_data_server_client_winx64_v11.1
set IBM_DB_HOME=C:\IBM\SQLLIB
set PATH=%IBM_DB_HOME%\BIN;%PATH%

@rs-rappavu

This comment has been minimized.

Copy link
Collaborator

@rs-rappavu rs-rappavu commented Feb 27, 2019

ibm_data_server_client_winx64_v11.1

Please try using 32 bit version of the ds-driver.

@ejakubowski

This comment has been minimized.

Copy link
Author

@ejakubowski ejakubowski commented Feb 28, 2019

Nope, still not working. I removed the x64 client and installed ibm_data_server_client_win32_v11.1. Not sure if I'm missing something else in the setup?

C:/Ruby23/lib/ruby/gems/2.3.0/gems/ibm_db-2.5.18-x86-mingw32/lib/mswin32/ibm_db.rb:1: warning: encountered \r in middle of line, treated as a mere space
C:/Ruby23/lib/ruby/gems/2.3.0/gems/ibm_db-2.5.18-x86-mingw32/lib/mswin32/ibm_db.rb:2: warning: encountered \r in middle of line, treated as a mere space
C:/Ruby23/lib/ruby/gems/2.3.0/gems/ibm_db-2.5.18-x86-mingw32/lib/mswin32/ibm_db.rb:3: warning: encountered \r in middle of line, treated as a mere space
C:/Ruby23/lib/ruby/gems/2.3.0/gems/ibm_db-2.5.18-x86-mingw32/lib/mswin32/ibm_db.rb:5: warning: encountered \r in middle of line, treated as a mere space
C:/Ruby23/lib/ruby/gems/2.3.0/gems/ibm_db-2.5.18-x86-mingw32/lib/mswin32/ibm_db.rb:6: warning: encountered \r in middle of line, treated as a mere space
C:/Ruby23/lib/ruby/gems/2.3.0/gems/ibm_db-2.5.18-x86-mingw32/lib/mswin32/ibm_db.rb:8: warning: encountered \r in middle of line, treated as a mere space
C:/Ruby23/lib/ruby/gems/2.3.0/gems/ibm_db-2.5.18-x86-mingw32/lib/mswin32/ibm_db.rb:9: warning: encountered \r in middle of line, treated as a mere space
C:/Ruby23/lib/ruby/gems/2.3.0/gems/ibm_db-2.5.18-x86-mingw32/lib/mswin32/ibm_db.rb:10: warning: encountered \r in middle of line, treated as a mere space
C:/Ruby23/lib/ruby/gems/2.3.0/gems/ibm_db-2.5.18-x86-mingw32/lib/mswin32/ibm_db.rb:11: warning: encountered \r in middle of line, treated as a mere space
C:/Ruby23/lib/ruby/gems/2.3.0/gems/ibm_db-2.5.18-x86-mingw32/lib/mswin32/ibm_db.rb:12: warning: encountered \r in middle of line, treated as a mere space
C:/Ruby23/lib/ruby/gems/2.3.0/gems/ibm_db-2.5.18-x86-mingw32/lib/mswin32/ibm_db.rb:13: warning: encountered \r in middle of line, treated as a mere space
C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- mswin32/rb2x/i386/ibm_db.so (LoadError) from C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/ibm_db-2.5.18-x86-mingw32/lib/mswin32/ibm_db.rb:10:in <top (required)>' from C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in require'
from C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in rescue in require' from C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in require'
from db2_test.rb:12:in `

'

@ejakubowski

This comment has been minimized.

Copy link
Author

@ejakubowski ejakubowski commented Feb 28, 2019

Also below is a better error message, the one I previously sent was when I tried to load the ibm_db gem that came with ibm_data_server_client_win32_v11.1. Below is with the latest ibm_db gem.

C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require': 126: The specified module could not be found. - C:/Ruby23/lib/ruby/gems/2.3.0/gems/ibm_db-4.0.0-x86-mingw32/lib/mswin32/rb2x/i386/ibm_db.so (LoadError) from C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/ibm_db-4.0.0-x86-mingw32/lib/mswin32/ibm_db.rb:90:in <top (required)>' from C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/ibm_db-4.0.0-x86-mingw32/lib/ibm_db.rb:21:in <top (required)>'
from C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in require' from C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in rescue in require'
from C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in require' from db2_test.rb:11:in

'

@rs-rappavu

This comment has been minimized.

Copy link
Collaborator

@rs-rappavu rs-rappavu commented Mar 1, 2019

You seem to use Ruby version 2.3. Sorry I did not notice it earlier. Please use version 2.2.6. Also for Windows, for require command please specify - require 'mswin32/ibm_db'

--- copy from my terminal ----
Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\rappavu>which irb
C:\Users\rappavu\Work\ruby\install\ruby-2.2.6-i386-mingw32\ruby-2.2.6-i386-mingw32\bin\irb

C:\Users\rappavu>irb
irb(main):001:0> require 'mswin32/ibm_db'
=> true
irb(main):002:0>
---- end ----

@rs-rappavu

This comment has been minimized.

Copy link
Collaborator

@rs-rappavu rs-rappavu commented Mar 1, 2019

For Rails, please use version 5.0.7

@hennooo

This comment has been minimized.

Copy link

@hennooo hennooo commented Jul 3, 2019

I experience the same issue as @ejakubowski. I'm using the 32-bit DB2 clidriver from http://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/nt32_odbc_cli.zip and tried requiring this gem using Ruby 2.6.3p62 so far. With your suggestion of using Ruby 2.2.6 I cannot even install the gem ibm_db since a requirement of it required Ruby 2.3:
C:\Users\myuser\Programme\ruby\bin>gem install ibm_db Fetching: io-like-0.3.0.gem (100%) Successfully installed io-like-0.3.0 Fetching: archive-zip-0.12.0.gem (100%) Successfully installed archive-zip-0.12.0 Fetching: arel-9.0.0.gem (100%) Successfully installed arel-9.0.0 Fetching: concurrent-ruby-1.1.5.gem (100%) Successfully installed concurrent-ruby-1.1.5 Fetching: thread_safe-0.3.6.gem (100%) Successfully installed thread_safe-0.3.6 Fetching: tzinfo-1.2.5.gem (100%) Successfully installed tzinfo-1.2.5 Fetching: i18n-1.6.0.gem (100%) ERROR: Error installing ibm_db: i18n requires Ruby version >= 2.3.0.

@aswerlein511

This comment has been minimized.

Copy link

@aswerlein511 aswerlein511 commented Oct 2, 2019

I am using Ruby -v 2.5 and tried 2.6. IBM_DB version 4.0.0 and when I include the require 'mswin32/ibm_db' I am getting the following error:

LoadError (126: The specified module could not be found. - C:/Ruby26/lib/ruby/gems/2.6.0/gems/ibm_db-4.0.0-x86-mingw32/lib/mswin32/rb2x/i386/ibm_db.so)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.