I think I found a fix. The metadata file of the RMagick 1.14.1 binary gem lists the require_paths in the following order:
require_paths:
- ext
- lib
Changing this to
require_paths:
- lib
- ext
fixes the problem. That's because RubyGems adds the library directories to $: (library search path) in the order given by require_paths. If the ext directory precedes the lib directory, RMagick.so (which resides in ext) is the first match when requiring RMagick and gets loaded. So switching the order of require_paths fixes the problem.