From: Brian Candler Date: 2010-07-13T21:36:24+09:00 Subject: Re: Standard Library vs. 3rd Party Library Thomas Sawyer wrote: >> Thus the only way to get the > latest version of RDoc is to use. > > require 'rubygems' > gem 'rdoc' I have the same problem with soap4r. To avoid the crufty version supplied with Ruby: require 'rubygems' gem 'soap4r' I don't have a particularly good solution for this, except to localise this code to the startup script: [bin/myapp] #!/usr/bin/ruby require 'rubygems' gem 'soap4r','>= 1.5.8' $:.unshift File.join(File.dirname(__FILE__),'..','lib') require 'myapp' MyApp.run It's ugly, but at least it's only in one place. Should anyone need to run your code with a non-rubygems framework, they can make a new startup script. Also, I don't know if there's a way to test if rubygems is present, but at worst you could do: begin gem 'soap4r' rescue NoMethodError end -- Posted via http://www.ruby-forum.com/.