Ruby cannot find module (LoadError) under Windows

I tried connecting to the database using Ruby (under Windows). For this:

  • install Ruby in C: \ Ruby193
  • install devkit (c: \ ruby193 \ devkit). Run "ruby dk.rb install", "ruby dk.rb install"
  • loaded rubigems (1.8.25). Done by ruby โ€‹โ€‹setup.rb
  • and: gem install rubyfb (Ruby adapter for Firebird)

After that, I wrote a short rb-script:

require 'rubygems' require 'rubyfb' include Rubyfb db = Database.new('test.gdb') 

And the error turned out:

C: /Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb: 36: in `require ': 126: the module cannot be found - C: / Ruby193 / lib / ruby โ€‹โ€‹/gems/1.9. 1 / gems / rubyfb-0.6.7 / lib / rubyfb_lib.so (LoadError)

This file exists, but Ruby cannot find it. All my attempts to rectify the situation failed.

I installed a different adapter, but the situation repeated - Ruby cannot find another file.

Please inform.

+4
source share
1 answer

I had the same problem. All I had to do was copy C:\Program Files\Firebird\Firebird_2_5\bin\fbclient.dll to C:\Ruby\bin .

+2
source

Source: https://habr.com/ru/post/1481519/