#3 楼@luikore 不是 extension,是 bin 里面的可执行文件。把 gem 的源码路径加到 load path,bin 还是没在系统 PATH 里,安装 gem 的时候会在 rvm 的 bin 里面生成一个可执行文件去找这个 bin path
#!/usr/bin/env ruby_executable_hooks## This file was generated by RubyGems.## The application 'gli' is installed as part of a gem, and# this file is here to facilitate running it.#require'rubygems'version=">= 0"ifARGV.firststr=ARGV.firststr=str.dup.force_encoding("BINARY")ifstr.respond_to?:force_encodingifstr=~/\A_(.*)_\z/andGem::Version.correct?($1)thenversion=$1ARGV.shiftendendgem'gli',versionloadGem.bin_path('gli','gli',version)