How to use a local ruby gem inside a Sketchup Extension

Now you know why SketchUp plugin developers don’t use gems.

Anyway … try just … (this is what the rubygems modification of Kernel.require does.)

DPMS_PATH = File.join( ENV['GEM_HOME'], 'gems', 'dpms-client', 'lib' )
$LOAD_PATH << DPMS_PATH
require "dpms-client" # <--<< name of loader file inside "lib" subdir

rubygems ASSUMES that the loader file inside the “lib” subdir has the same name as the gem itself. Sometimes when it does not weird things happen. (An example is the rubyzip gem which has [or used to have] a loader named "lib/zip.rb" instead of "lib/rubyzip.rb".)