I'm trying to load a gem that I've unpacked to vendor/gems from Rake, but can't find an easy way to do it using Rails gem support. Is there one? I do not want to add the gem using config.gem in environment.rb because I only want to load it from a rake task. It seems like vendor/gems would be better if it took advantage of gem_home and gem_path in Rubygems. If it was implemented like this, after executing :environment task in rake, I could just use: gem "the_gem", "1.0" It would load from vendor/gems if it's there, otherwise it would look for it on the system. I think it could simplify the implementation of Rails::GemDependency too. Also, if gem_home and gem_path were set earlier in the Rails initialization process, it would be easier to unpack RedCloth and get the textilize method in ActionView::Helpers::TextHelper. Right now, the TextHelper module is loaded before the gems initialization logic, so unpacking RedCloth doesn't work. Of course, the implementation of TextHelper could be changed - but this is just an example. Thoughts? -Dan
on 07.07.2008 22:23
on 08.07.2008 17:29
On Mon, Jul 7, 2008 at 1:20 PM, Dan Manges <daniel.manges@gmail.com>
wrote:
> Thoughts?
Use GemInstalller from config/preinitializer.rb and I believe all
these problems go away (let me know if they don't, and feel free to
ask/open bugs).
-- Chad