[rspec-devel] re quire 'rubygems'

Tobias Grimm listaccount at e-tobi.net
Thu Mar 26 07:28:16 EDT 2009

Mark Wilden wrote:
> So require rubygems or don't require it - it doesn't matter to me (or
> anyone I know) because I have rubygems installed. So do 99% of Rails
> users, I'm willing to bet.

You're right. But there are scenarios, where rubygems just is not needed.
>From a Debian Developers point of view, there is no reason for most packaged
Ruby applications or libs to depend on rubygems, because any dependencies
must be available as a Debian package anyway. It's not a problem to just
strip the "require 'rubygems'" in the Debian package, but I prefer to push
such changes upstream. My patch that David put into the require-rubygems
branch, is just a compromise - load a library if available, if no try it
with rubygems. (But I prefer Mike's proposal with the "retry" statement -
haven't thought of this one...)

In general and from a software developers point of view, I don't think RSpec
should require rubygems anywhere in it's libraries (!) at all! RSpec needs
heckle and diff-lcs, not rubygems. RSpec shouldn't be aware from where and
how external libraries it doesn't ship need to be loaded. This is an
end-user issue and should be dealed with at the end-user level. This means
RUBYOPTS or the bin/spec executable.

Just my two cent....


View this message in context: http://www.nabble.com/require-%27rubygems%27-tp22714532p22720122.html
Sent from the rspec-devel mailing list archive at Nabble.com.

More information about the rspec-devel mailing list