Can we install C gems in ruby 2.7.0

168 Views Asked by At

I just upgraded by ruby to 2.7.0.

And I tried to install the ibm_db gem in windows platform. Installation works fine. When I try to use the gem(like require 'ibm_db') I get the following error

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

I have faced this type of error in ruby 2.6 also but when I have set RUBY_DLL_PATH to the ddl which the gem uses it is solved.

But in ruby 2.7 even after setting this variable I get the following error.

Can anyone please help in solving this? ( I have one more doubt:- c gems are supported in ruby 2.7)

2

There are 2 best solutions below

0
akhil On BEST ANSWER

The issue is because the binary was pointed to ruby 2.6 binary. So replace it with the latest ruby 2.7 binary and then everything works fine.

Thanks, Akhil

0
Holger Just On

It appears that the ibm_db gem currently does not support Ruby 2.7 yet. The newest Ruby version they support is Ruby 2.6.x.

There is a pull request at https://github.com/ibmdb/ruby-ibmdb/pull/105 which might add support for Ruby 2.7 though.