你可以尝试一下
Gem.loaded_specs[$NAME_OF_GEM].version
gem
Gem.loaded_specs
Gem.latest_spec_for
Gem.latest_spec_for('rails').version.to_s # '3.2.8'