[rspec-devel] require 'rubygems'

Jim Weirich jim.weirich at gmail.com
Wed Mar 25 22:50:47 EDT 2009


On Mar 26, 2009, at 1:31 AM, David Chelimsky wrote:

>  require 'rubygems' unless ENV['NO_RUBYGEMS']

This is what I use in Rake:

begin
   require 'rake'
rescue LoadError
   require 'rubygems'
   require 'rake'
end

Try without rubygems, then if it fails, try again with rubygems.

-- 
-- Jim Weirich
-- jim.weirich at gmail.com



More information about the rspec-devel mailing list