[rspec-devel] require 'rubygems'
peter.fitzgibbons at gmail.com
Wed Mar 25 22:02:58 EDT 2009
-1 on the push to master.
I agree with Tobias' synopsis. I think though that there could be something
better than letting anyone's library fail without proper libraries. As
troublesome as rubygems might be for some, it is clear when I get a
rubygems-load error that I'm missing an install detail. When I get a load
error from require... WTH? Maybe without rubygems I'd expect any load error
to be something "I" missed.
David, you may have stumbled upon a wakeup call to many rspec users who have
not been paying attention to their library loading mechanism. To any of
those in pain... ever used PERL? Shove THAT in your load library! Ruby is
sane in comparison.
So, rant and vote all in one. A two in one deal!
Email: peter.fitzgibbons at gmail.com
IM GTalk: peter.fitzgibbons
IM Yahoo: pjfitzgibbons
IM MSN: pjfitzgibbons at hotmail.com
IM AOL: peter.fitzgibbons at gmail.com
On Wed, Mar 25, 2009 at 8:31 PM, David Chelimsky <dchelimsky at gmail.com>wrote:
> Hey all,
> I'd like your feedback on something before I merge it into master.
> Before the 1.2 release I read http://gist.github.com/54177, in which
> Ryan Tomayko explains why "require 'rubygems'" should not appear in
> your library code. This made some sense to me. So much so, that I
> yanked it from rspec for the 1.2 release.
> Then the bug reports started coming in and some conversation led me to
> believe that this had been a mistake because it caused pain for the
> lion's share of rspec users because most libraries go ahead and
> require 'rubygems', so that has become the defacto standard situation,
> for better or worse.
> The solution that I added to 1.2.1 was to reinstate "require
> 'rubygems'" but with a catch:
> require 'rubygems' unless ENV['NO_RUBYGEMS']
> This seemed like a fair tradeoff, since it allowed those who didn't
> want to have to think about it to just use rspec as/is, and those who
> do care and don't use rubygems in any given environment had an out.
> I've just received another report about that decision, with a patch,
> that offers what I think is a better solution:
> I've pushed Tobias' patch to a require-rubygems branch for the moment.
> I'm inclined to merge it into master, but this would the third release
> in a row that makes changes to how rspec handles rubygems, and I want
> it to be the last. So please let me know your thoughts, for or
> rspec-devel mailing list
> rspec-devel at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-devel