Hey gang.<div><br></div><div>Jed noticed an issue with the 'dependency'/'dependencies' macro the other day when working on the Collective wiki. Namely, if you make RedCloth a dependency Merb gets a little cranky. I think I have this figured out when doing some mods to Collective today too. However, before I go trying to fix this in Merb, I wanted to run this by the community.</div>
<div><br></div><div>The problem is simple: RedCloth requires you first load Rubygems. That is...</div><div><br></div><div><span class="Apple-style-span" style="font-family: Times; font-size: 16px; "><div style="margin-top: 8px; margin-right: 8px; margin-bottom: 8px; margin-left: 8px; font: normal normal normal small/normal arial; ">
Hey Jed.<div><br></div><div>I think I have this 'dependency' and RedCloth thing figured out. When I was trying to make the Viking gem a dependency Merb complained. Do you know what both RedCloth and Viking (gem) require? Rubygems! That is...</div>
<div><br></div></div></span></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"># In IRB...<br>irb> require 'redcloth'<br>LoadError: no such file to load -- redcloth<br>
from (irb):1:in `require'<br> from (irb):1<br> from :0<br>irb> require 'rubygems'<br>true<br>irb> require 'redcloth'<br>true<br></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<br></blockquote>My question is this: do we change the dependencies macro to load rubygems when this happens, or do we ignore it and demand that the user explicitly require a library outside of the dependencies macro (see <a href="http://github.com/meekish/collective/tree/master/config/init.rb#L25">http://github.com/meekish/collective/tree/master/config/init.rb#L25</a> for an illustration)?<div>
<br></div><div>James H.</div>