Gregory Brown wrote: > I'd like to make this friendly to RubyGems 0.9.1 by using the gem > method rather than require_gem when people have 0.9.1, but want to > generate require_gem for older versions. > > So basically, is there a constant or method I can call that'll give me > back the version of rubygems that i'm running? For 0.8.11 and 0.9.0, this should work: require 'rubygems/rubygems_version' p Gem::RubyGemsVersion but no promises on any other version. Check the SCM history. That said, why not rescue NoMethodError? Devin