Digging further with "strace -e file", I can see that: * other modules are indeed searched for in the kramdown-parser-gfm directory, eg:
187928 stat("/usr/share/rubygems-integration/all/gems/kramdown-parser-gfm-1.1.0/lib/idn", 0x7ffd35c48590) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 stat("/usr/share/rubygems-integration/all/gems/kramdown-parser-gfm-1.1.0/lib/idn.rb", 0x7ffd35c48590) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 stat("/usr/share/rubygems-integration/all/gems/kramdown-parser-gfm-1.1.0/lib/idn.so", 0x7ffd35c48590) = -1 ENOENT (Aucun fichier ou dossier de ce type) * kramdown-parser-gfm itself is looked for in others' directories... but not in its own: 187928 openat(AT_FDCWD, "/usr/lib/ruby/vendor_ruby/kramdown-parser-gfm.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 openat(AT_FDCWD, "/usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/kramdown-parser-gfm.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 openat(AT_FDCWD, "/usr/share/rubygems-integration/all/gems/minima-2.5.1/lib/kramdown-parser-gfm.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 openat(AT_FDCWD, "/usr/share/rubygems-integration/all/gems/jekyll-titles-from-headings-0.5.3/lib/kramdown-parser-gfm.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 openat(AT_FDCWD, "/usr/share/rubygems-integration/all/gems/jekyll-sitemap-1.4.0/lib/kramdown-parser-gfm.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 openat(AT_FDCWD, "/usr/share/rubygems-integration/all/gems/jekyll-seo-tag-2.7.1/lib/kramdown-parser-gfm.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 openat(AT_FDCWD, "/usr/share/rubygems-integration/all/gems/jekyll-last-modified-at-1.3.0/lib/kramdown-parser-gfm.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 openat(AT_FDCWD, "/usr/share/rubygems-integration/2.7.0/gems/posix-spawn-0.3.13/lib/kramdown-parser-gfm.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 openat(AT_FDCWD, "/usr/share/rubygems-integration/2.7.0/extensions/x86_64-linux/2.7.0/posix-spawn-0.3.13/kramdown-parser-gfm.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 openat(AT_FDCWD, "/usr/share/rubygems-integration/all/gems/jekyll-feed-0.15.1/lib/kramdown-parser-gfm.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 openat(AT_FDCWD, "/usr/share/rubygems-integration/all/gems/jekyll-asciidoc-3.0.0/lib/kramdown-parser-gfm.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 openat(AT_FDCWD, "/usr/share/rubygems-integration/all/gems/jekyll-3.9.0/lib/kramdown-parser-gfm.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 openat(AT_FDCWD, "/usr/share/rubygems-integration/all/gems/safe_yaml-1.0.5/lib/kramdown-parser-gfm.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 openat(AT_FDCWD, "/usr/share/rubygems-integration/all/gems/rouge-3.21.0/lib/kramdown-parser-gfm.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 openat(AT_FDCWD, "/usr/share/rubygems-integration/all/gems/pathutil-0.16.1/lib/kramdown-parser-gfm.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 openat(AT_FDCWD, "/usr/share/rubygems-integration/all/gems/mercenary-0.3.6/lib/kramdown-parser-gfm.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 openat(AT_FDCWD, "/usr/share/rubygems-integration/all/gems/liquid-4.0.3/lib/kramdown-parser-gfm.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 openat(AT_FDCWD, "/usr/share/rubygems-integration/all/gems/kramdown-2.3.0/lib/kramdown-parser-gfm.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 openat(AT_FDCWD, "/usr/lib/ruby/gems/2.7.0/gems/rexml-3.2.3/lib/kramdown-parser-gfm.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) 187928 openat(AT_FDCWD, "/usr/share/rubygems-integration/all/gems/jekyll-watch-2.2.1/lib/kramdown-parser-gfm.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) ... $ grep kramdown-parser-gfm.rb /tmp/log | wc -l 45 grep kramdown-parser-gfm.so /tmp/log | wc -l 45 $ grep kramdown-parser-gfm.rb /tmp/log | grep kramdown-parser-gfm-1.1.0 | wc -l 0 $ grep kramdown-parser-gfm.so /tmp/log | grep kramdown-parser-gfm-1.1.0 | wc -l 0