The LoadError message, "cannot load file -- ./SketchUpPlugin.dll" indicates you are relying upon what the current working directory is. Ie, the global require method must either be a full absolute pathname to the file, OR a good relative pathname from one of the paths in the global $LOAD_PATH array.
SketchUp will automatically push the paths to valid “Plugins” directories into the global $LOAD_PATH array.
So, … within your "Bim.rb" file, you should be calling require sketchup_plugin_dll, where sketchup_plugin_dll is either the full absolute path to the DLL file, or a relative path from SketchUp’s "Plugins" directory.
Since, ALL extensions must be within their OWN subdirectory, you can prefix the path with your extension’s subfoldername. So let us pretend that your extension’s subfolder name is: "mahadev_bimmatch"
To use a relative path string, you would then load your DLL via a call like:
require "mahadev_bimmatch/SketchUpPlugin.dll"
In this case the require method will use all the paths in the $LOAD_PATH array to find an existing file to load. If it finds a match, it will load it.
To use an absolute path, you can use some of Ruby’s core methods from the File class.
If the DLL file is in the same directory as the Ruby file that is making the call to load it, then do:
require File.join( __dir__, 'SketchUpPlugin.dll' )
… OR to use String interpolation …
require "#{__dir__}/SketchUpPlugin.dll"
See method documentation for: