From: Ryan Leavengood Date: 2005-10-02T13:25:14+09:00 Subject: Re: why can't Ruby load .gem files directly? On 10/1/05, Joshua Haberman wrote: > > Think how great it would be if "installing a gem" was equivalent to > "putting the gem file in your RUBYLIB path." What could be simpler? > Sure, you couldn't put checks in place to make sure I've installed > all the right dependencies, but you'll figure that out at runtime, > when I try to load that gem (or you could use "gem check"). My original prototype for RubyGems did exactly this. I considered gem files to be much like a Java jar file, and the code was loaded directly from the gem when required. My prototype used some custom file formats (two actually, a plain text and a binary one, just for fun) that contained the embedded code and some metadata. I presented this prototype at RubyConf 2001, but stopped development due to lack of certain libraries (zip for example) as well as some other real-life issues (like being overwhelmed, losing interest and not having time.) When Jim and the other guys decided to bring RubyGems back to life at RubyConf 2003, they started with some fresh code, and I'm not sure why they chose to implement gems as they did (but I'm sure there was a good reason for having the separate install step, like maybe performance.) Either way, as Jim says your use cases are supported in the latest RubyGems, though now that is has been brought up, I'd like to play with some of my old ideas again. Based on recent discussions though, I wonder if RubyGems need to be re-written for a third time (though strictly speaking my first revision really was a prototype and didn't have even close to the feature-set of the current system.) Ryan