Guys, Imagine going to the perl community and saying: We have this great new feature to add to the installation tool, versioning! You'll love it, and after you start using it, every single one of your perl scripts will stop working... But its easy, all you have to do is make some simple changes to every single one of the scripts you've deployed (many of which you didn't write) or else just make sure that you have this environment variable set everywhere you use perl. What? You don't like it? All you are perl gods, and you think its too hard to set a little environment variable everywhere you run perl, or just add a few little lines to every script? You would be mocked, or just hear an astounded silence, really. The environment is for *customization*, requiring env to be set in order to run ruby is silly. Sorry if I sound a little heated, but I can't understand why its even being thought of as an option! Your programs should not have to be modified depending on the tool used to install. Its a non-starter. Better to hear this first from somebody who really likes ruby, and really wants gems to work. If you install something, and require doesn't load it, then ITS NOT PROPERLY INSTALLED. Quoting jim / freeze.org, on Fri, Mar 04, 2005 at 02:57:11PM +0900: > * Sam Roberts <sroberts / uniserve.com> [2005-03-04 14:37:28 +0900]: > > Code written with the require_gems won't work for people who don't have > > gems, even if they have the libraries. > > Is it really that much trouble to write: > > begin > require 'some-lib' > rescue LoadError > require 'rubygems' > require 'some-lib' > end Multiply that code by 6 if I bring in 6 libs, any of which could have been installed by the user with or without gems. Do you still think its not that much trouble? Of course, at this point you'd start every file with: unless defined? special_require def special_require(p) begin require p rescue LoadError require 'rubygems' require p end end end special_require 'some-lib' ... Imagine publishing this demo code in a DDJ issue, and imagine the first letter to the editor: Why can't you just use 'require' in ruby? You can call 'import' in java/python, 'include' in C/C++, .... Quoting halostatue / gmail.com, on Fri, Mar 04, 2005 at 03:44:06PM +0900: > On Fri, 4 Mar 2005 14:37:28 +0900, Sam Roberts > <sroberts / uniserve.com> wrote: > > MY CODE. IT'S MY CODE. Argh. > > Sam: if it is an application script, then you have the ability to > solve it, too. Easily. I'm recently using OS X at home, mac-heads don't even know what the environment IS, much less how to change it. They can't even see a .bashrc file in their gui in order to open and edit it with the apple text editor. And how am I supposed to convince Xcode to have RUBYOPT set in its environment when it runs a ruby project? You deploy things on customer sites, right? When those customers reinstall ruby using the new great ruby gems installer, and all the scripts you wrote last year fail, are you looking forward to "easily" fixing all those scripts and redeploying them, instead of adding a cool feature to PDFWriter? > Look at bin/ruwiki_servlet in the Ruwiki package. I have a *single* > script that solves the problem of running in any of the > configurations that I have anticipated for Ruwiki. > > If it's *not* an application script, then, well, they *know* it's a > gem, so they can do "require 'rubygems'" before requiring net/mdns. Sure, and then publish their script. Next guy who runs it, it dies. Why? Oh, they don't have net/mdns installed as a gems. No problem, we'll just patch up the script a little, it'll eventually work... Imagine if debian put the includes for any library you installed in a special directory you had to add to your makefile and said "guys, it's easy! just add this -I to your CFLAGS, and if you use automake its even easier, just add this one line to all your autoconf setups... its easy! And we've got versioning and nobody else does! We're great!' What would you think? Why is it different with ruby? Sam