From anatol.pomozov at gmail.com Thu Mar 1 21:01:51 2007 From: anatol.pomozov at gmail.com (Cerberus) Date: Fri, 2 Mar 2007 05:01:51 +0300 Subject: [Rubygems-developers] [rubygems] Build fixed by drbrain (#1215) Message-ID: <45e7858feb988_75c15fd4e815@ubuntu.tmail> ------------------------------------------------------------------------ r1215 | drbrain | 2007-03-02 04:52:00 +0300 | 1 line Changed paths: M /trunk/ChangeLog M /trunk/lib/rubygems/open-uri.rb Fix all the infinite loop errors. ------------------------------------------------------------------------ (in C:/Documents and Settings/anatol/.cerberus/work/rubygems/sources) Loaded suite C:/Program Files/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader Started ........................................................................................................................................................................................................................................................................................................ Finished in 28.516 seconds. 296 tests, 1028 assertions, 0 failures, 0 errors C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:100: warning: already initialized constant Options C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:103: warning: redefine check_options C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:112: warning: redefine scan_open_optional_arguments C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:122: warning: redefine open_uri C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:148: warning: redefine open_loop C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:221: warning: redefine redirectable? C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:229: warning: redefine open_http C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:340: warning: method redefined; discarding old initialize C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:348: warning: method redefined; discarding old initialize C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:354: warning: already initialized constant StringMax C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:355: warning: method redefined; discarding old << C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:368: warning: method redefined; discarding old io C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:376: warning: redefine init C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:402: warning: method redefined; discarding old meta_add_field C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:407: warning: method redefined; discarding old last_modified C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:415: warning: already initialized constant RE_LWS C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:416: warning: already initialized constant RE_TOKEN C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:417: warning: already initialized constant RE_QUOTED_STRING C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:418: warning: already initialized constant RE_PARAMETERS C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:420: warning: method redefined; discarding old content_type_parse C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:440: warning: method redefined; discarding old content_type C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:455: warning: method redefined; discarding old charset C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:472: warning: method redefined; discarding old content_encoding C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:610: warning: method redefined; discarding old open C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:618: warning: method redefined; discarding old read C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:643: warning: method redefined; discarding old find_proxy C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:708: warning: method redefined; discarding old buffer_open C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:716: warning: method redefined; discarding old buffer_open -- Cerberus 0.3.4, http://cerberus.rubyforge.org/ From anthonyeden at gmail.com Fri Mar 2 13:02:19 2007 From: anthonyeden at gmail.com (Anthony Eden) Date: Fri, 2 Mar 2007 13:02:19 -0500 Subject: [Rubygems-developers] Gemtacular UI Lovin? Message-ID: Anyone willing to give Gemtacular some UI lovin so we can work towards getting it deployed at rubygems.org? Pretty please with sugar on top. :-) V/r Anthony -- Cell: 808 782-5046 Current Location: Melbourne, FL From charles.nutter at sun.com Fri Mar 2 14:09:34 2007 From: charles.nutter at sun.com (Charles Oliver Nutter) Date: Fri, 02 Mar 2007 13:09:34 -0600 Subject: [Rubygems-developers] Buggity bug Message-ID: <45E8766E.7080106@sun.com> This is in 0.9.1, affecting both JRuby and Ruby... ~ $ gem list --remote -p ERROR: While executing gem ... (NoMethodError) undefined method `[]=' for # I've done absolutely no investigation. It appears that []= is not (any longer) defined for Gem::ConfigFile. I'm swamped today and can't investigate any further, but it's pretty easy to reproduce - Charlie From drbrain at segment7.net Fri Mar 2 15:52:17 2007 From: drbrain at segment7.net (Eric Hodel) Date: Fri, 2 Mar 2007 12:52:17 -0800 Subject: [Rubygems-developers] Buggity bug In-Reply-To: <45E8766E.7080106@sun.com> References: <45E8766E.7080106@sun.com> Message-ID: <6148BC18-820A-4538-B54B-A713C8EC7706@segment7.net> On Mar 2, 2007, at 11:09, Charles Oliver Nutter wrote: > This is in 0.9.1, affecting both JRuby and Ruby... > > ~ $ gem list --remote -p > ERROR: While executing gem ... (NoMethodError) > undefined method `[]=' for # > > I've done absolutely no investigation. It appears that []= is not (any > longer) defined for Gem::ConfigFile. I'm swamped today and can't > investigate any further, but it's pretty easy to reproduce gem --debug list --remote -p Then open a ticket on the tracker. From transfire at gmail.com Sat Mar 3 15:22:28 2007 From: transfire at gmail.com (TRANS) Date: Sat, 3 Mar 2007 15:22:28 -0500 Subject: [Rubygems-developers] muti-packaging Message-ID: <4b6f054f0703031222i25822fbx3b470349e7924ed2@mail.gmail.com> (Posted this to Ruby-talk then realized it would be better here) Any chance of getting RubyGems to support the packages/ dir that's supported by setup.rb? I currently have to run a custom staging task before I can create a gem for a project that has subprojects. Alternatively, RubyGem multi-packages might be nice. Installing a multi-package would install dependent packages, but would behave as if it were a single package. Another thought, is to create a "GemCruncher" that could take a set of gems and merge them into a single gem. T. From drbrain at segment7.net Sat Mar 3 19:07:51 2007 From: drbrain at segment7.net (Eric Hodel) Date: Sat, 3 Mar 2007 16:07:51 -0800 Subject: [Rubygems-developers] muti-packaging In-Reply-To: <4b6f054f0703031222i25822fbx3b470349e7924ed2@mail.gmail.com> References: <4b6f054f0703031222i25822fbx3b470349e7924ed2@mail.gmail.com> Message-ID: <3F08B04C-539D-4524-8256-8223D650E74B@segment7.net> On Mar 3, 2007, at 12:22, TRANS wrote: > (Posted this to Ruby-talk then realized it would be better here) > > Any chance of getting RubyGems to support the packages/ dir that's > supported by setup.rb? I currently have to run a custom staging task > before I can create a gem for a project that has subprojects. What are these packages supported by setup.rb? > Alternatively, RubyGem multi-packages might be nice. Installing a > multi-package would install dependent packages, but would behave as if > it were a single package. Adding an uninstall flag that would install a gem and any of its unused dependencies would be a more-general solution. > Another thought, is to create a "GemCruncher" that could take a set of > gems and merge them into a single gem. Write one and we'll consider merging it, but I don't think anybody else has requested such a feature. From transfire at gmail.com Sat Mar 3 20:29:23 2007 From: transfire at gmail.com (TRANS) Date: Sat, 3 Mar 2007 20:29:23 -0500 Subject: [Rubygems-developers] muti-packaging In-Reply-To: <3F08B04C-539D-4524-8256-8223D650E74B@segment7.net> References: <4b6f054f0703031222i25822fbx3b470349e7924ed2@mail.gmail.com> <3F08B04C-539D-4524-8256-8223D650E74B@segment7.net> Message-ID: <4b6f054f0703031729s401a071bl3e01513c1fe27a9d@mail.gmail.com> Hi-- On 3/3/07, Eric Hodel wrote: > On Mar 3, 2007, at 12:22, TRANS wrote: > > (Posted this to Ruby-talk then realized it would be better here) > > > > Any chance of getting RubyGems to support the packages/ dir that's > > supported by setup.rb? I currently have to run a custom staging task > > before I can create a gem for a project that has subprojects. > > What are these packages supported by setup.rb? >From the setup.rb manual: Creating Multi-Package Archive setup.rb can handle an archive which includes multiple PACKAGEs. setup.rb requires the archive is structured as below: PackageTop/ setup.rb packages/ <--- fixed name tmail/ <--- tmail package bin/ lib/ ext/ data/ conf/ man/ test/ raccrt/ <--- raccrt package bin/ lib/ ext/ data/ conf/ man/ test/ strscan/ <--- strscan package bin/ lib/ ext/ data/ conf/ man/ test/ amstd/ <--- amstd package bin/ lib/ ext/ data/ conf/ man/ test/ Can't say I've ever been fond of the dir name 'packages' but that's what Minero choose. In anycase, it allows one to break up a large project into parts that might be useful on ther own. > > Alternatively, RubyGem multi-packages might be nice. Installing a > > multi-package would install dependent packages, but would behave as if > > it were a single package. > > Adding an uninstall flag that would install a gem and any of its > unused dependencies would be a more-general solution. Hmm... It's largely a perceptual difference from the end users point of view. If the end user has to say 'y' to every dependency then there is a barrier of acceptance of sorts. This is still true for the special flag on the command line --"say yes to all", too. The tendecy is to use the shortest command so even a small flag like '-y' can create this perceptual barrier. Maybe it should be the other way around and the deafult behavior should be '-y'. After all if you trust a gem enough to install it wouldn't you trust the dependencies it relies on too? > > Another thought, is to create a "GemCruncher" that could take a set of > > gems and merge them into a single gem. > > Write one and we'll consider merging it, but I don't think anybody > else has requested such a feature. Okay, I'll consider it. Thanks, T. From darix at web.de Tue Mar 6 09:57:40 2007 From: darix at web.de (Marcus Rueckert) Date: Tue, 6 Mar 2007 15:57:40 +0100 Subject: [Rubygems-developers] undefined method refresh for Hash In-Reply-To: <02D5111F-5ACF-4586-BD75-2DB6D14D1FF6@segment7.net> References: <20070122180230.GA24161@pixel.global-banlist.de> <8194C254-9172-442F-A491-363B15317ECD@segment7.net> <20070122191952.GV24702@pixel.global-banlist.de> <02D5111F-5ACF-4586-BD75-2DB6D14D1FF6@segment7.net> Message-ID: <20070306145740.GA21493@pixel.global-banlist.de> On 2007-01-22 13:15:56 -0800, Eric Hodel wrote: > On Jan 22, 2007, at 11:19, Marcus Rueckert wrote: > > On 2007-01-22 11:13:44 -0800, Eric Hodel wrote: > >> On Jan 22, 2007, at 10:02, Marcus Rueckert wrote: > >>> on irc i saw a few users with the following problem: > >>> [[[ > >>> 22:53:20 < nertzy> Does anyone here know the proper way to fix the > >>> "undefined method `refresh' for #" error with the new > >>> rubygems > >>> ]]] > >>> > >>> whats the proposed solution for this? any ideas when it happens? > >> > >> I've got a script to repair half of the problem. I haven't found the > >> other half yet. After that RubyGems should be self repairing. > > > > mind to share the script? i would put it into the %post script of the > > rpm. so i avoid breaking stuff for users. > > Of course. I'll be distributing it here, on ruby-talk and on my > blog. I'll finish it tonight or tomorrow. *ping* darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org From phurley at gmail.com Wed Mar 7 09:38:54 2007 From: phurley at gmail.com (Patrick Hurley) Date: Wed, 7 Mar 2007 09:38:54 -0500 Subject: [Rubygems-developers] Building binary gems Message-ID: <554ac39c0703070638p2300a056t146165ceef212047@mail.gmail.com> Is there an easy (read automated) way to take an installed gem (that required binary compilation) from a development/build machine and create a binary gem to install on a different machine? I have production servers that will not include a C/C++ compiler or other development tools -- I would like to use gems for my packaging and deployment. I can of course do this by hand, but it seems like a common enough task, that others may have already encountered (and solved) this problem. If not would this feature be a welcome patch to gem? Thanks pth From Daniel.Berger at qwest.com Wed Mar 7 11:39:27 2007 From: Daniel.Berger at qwest.com (Daniel Berger) Date: Wed, 07 Mar 2007 09:39:27 -0700 Subject: [Rubygems-developers] Building binary gems In-Reply-To: <554ac39c0703070638p2300a056t146165ceef212047@mail.gmail.com> References: <554ac39c0703070638p2300a056t146165ceef212047@mail.gmail.com> Message-ID: <45EEEABF.7000904@qwest.com> Patrick Hurley wrote: > Is there an easy (read automated) way to take an installed gem (that > required binary compilation) from a development/build machine and > create a binary gem to install on a different machine? Based on what I'm reading at http://docs.rubygems.org/read/chapter/6 (which is really chapter 8, but nevermind) you should be able to run gem_server on the dev machine, and then point your remote installs at that machine. Regards, Dan From phurley at gmail.com Wed Mar 7 12:07:12 2007 From: phurley at gmail.com (Patrick Hurley) Date: Wed, 7 Mar 2007 12:07:12 -0500 Subject: [Rubygems-developers] Building binary gems In-Reply-To: <45EEEABF.7000904@qwest.com> References: <554ac39c0703070638p2300a056t146165ceef212047@mail.gmail.com> <45EEEABF.7000904@qwest.com> Message-ID: <554ac39c0703070907kcda6663y5fe394e0aa1f7c00@mail.gmail.com> On 3/7/07, Daniel Berger wrote: > Patrick Hurley wrote: > > Is there an easy (read automated) way to take an installed gem (that > > required binary compilation) from a development/build machine and > > create a binary gem to install on a different machine? > > Based on what I'm reading at http://docs.rubygems.org/read/chapter/6 > (which is really chapter 8, but nevermind) you should be able to run > gem_server on the dev machine, and then point your remote installs at > that machine. For me that seems to serve the gems out of the gems cache directory, which does not include any locally built binary bits. Thanks pth From rick.denatale at gmail.com Wed Mar 7 12:28:50 2007 From: rick.denatale at gmail.com (Rick DeNatale) Date: Wed, 7 Mar 2007 12:28:50 -0500 Subject: [Rubygems-developers] Two versions of ruby 1.8.x on same system with working rubygems, possible? Message-ID: I might be trying to do something which is impossible. I've got both ruby 1.8.5 and 1.8.6 installed on a system as well as ruby1.9 the libraries are in /usr/local/lib/ruby/site_setup 1.8.5 1.8.6 1.9 I'd like now to install rubygems so that it can be used with either 1.8.5 OR 1.8.6 but I can't figure out which options to use with setup.rb in order to do this. I'd be happy if these were two separate rubygems installs, but it would be great if the gems could be shared if that made sense. Is this even possible? Looking at the code in setup.rb it seems to disregard the tiny part of the ruby version. -- Rick DeNatale From Daniel.Berger at qwest.com Wed Mar 7 12:46:23 2007 From: Daniel.Berger at qwest.com (Daniel Berger) Date: Wed, 07 Mar 2007 10:46:23 -0700 Subject: [Rubygems-developers] Building binary gems In-Reply-To: <554ac39c0703070907kcda6663y5fe394e0aa1f7c00@mail.gmail.com> References: <554ac39c0703070638p2300a056t146165ceef212047@mail.gmail.com><45 EEEABF.7000904@qwest.com> <554ac39c0703070907kcda6663y5fe394e0aa1f7c00@mail.gmail.com> Message-ID: <45EEFA6F.9090000@qwest.com> Patrick Hurley wrote: > On 3/7/07, Daniel Berger wrote: >> Patrick Hurley wrote: >>> Is there an easy (read automated) way to take an installed gem (that >>> required binary compilation) from a development/build machine and >>> create a binary gem to install on a different machine? >> Based on what I'm reading at http://docs.rubygems.org/read/chapter/6 >> (which is really chapter 8, but nevermind) you should be able to run >> gem_server on the dev machine, and then point your remote installs at >> that machine. > > For me that seems to serve the gems out of the gems cache directory, > which does not include any locally built binary bits. Hm, I think you would have to modify the gemspec itself to include the binary files. It would be a pain to recreate the gems (and modify them in such a way that they don't try to build from source), but you would only have to do it once per gem, on the dev server. Otherwise, I think you're relegated to remote copying/ftp'ing/whatever via a separate script. I'm not sure how this could be built into rubygems itself, though. I mean, if the binaries aren't added to the list of files in the gemspec initially, how would a gem install know, via whatever command line option, that it's supposed to grab the binary? For some of the Win32Utils packages I have two separate gems, one that's prebuilt and includes the binaries, and one that requires that you build from source. If there's a better way I'm all ears. Regards, Dan From phurley at gmail.com Wed Mar 7 13:35:33 2007 From: phurley at gmail.com (Patrick Hurley) Date: Wed, 7 Mar 2007 13:35:33 -0500 Subject: [Rubygems-developers] Building binary gems In-Reply-To: <45EEFA6F.9090000@qwest.com> References: <554ac39c0703070638p2300a056t146165ceef212047@mail.gmail.com> <554ac39c0703070907kcda6663y5fe394e0aa1f7c00@mail.gmail.com> <45EEFA6F.9090000@qwest.com> Message-ID: <554ac39c0703071035y366163ccgcf800c9ca3ff27e1@mail.gmail.com> On 3/7/07, Daniel Berger wrote: > I'm not sure how this could be built into rubygems itself, though. I > mean, if the binaries aren't added to the list of files in the gemspec > initially, how would a gem install know, via whatever command line > option, that it's supposed to grab the binary? I was actually thinking of doing something a little crude: 1. Get the original gemspec 2. Remove any extensions 3. Add current platform to gemspec 4. Add all files in the installed gem tree to the manifest 5. Create the gem Am I missing something? pth From thewoolleyman at gmail.com Wed Mar 7 14:19:05 2007 From: thewoolleyman at gmail.com (Chad Woolley) Date: Wed, 7 Mar 2007 12:19:05 -0700 Subject: [Rubygems-developers] Two versions of ruby 1.8.x on same system with working rubygems, possible? In-Reply-To: References: Message-ID: Try setting the GEM_HOME environment var. This seems to be required for setup.rb to work properly, even if you have a config file pointing to another location. On 3/7/07, Rick DeNatale wrote: > I might be trying to do something which is impossible. > > I've got both ruby 1.8.5 and 1.8.6 installed on a system as well as > ruby1.9 the libraries are in > > /usr/local/lib/ruby/site_setup > 1.8.5 > 1.8.6 > 1.9 > > I'd like now to install rubygems so that it can be used with either > 1.8.5 OR 1.8.6 but I can't figure out which options to use with > setup.rb in order to do this. I'd be happy if these were two separate > rubygems installs, but it would be great if the gems could be shared > if that made sense. > > Is this even possible? Looking at the code in setup.rb it seems to > disregard the tiny part of the ruby version. > > -- > Rick DeNatale > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > From ndw at nwalsh.com Thu Mar 8 14:48:02 2007 From: ndw at nwalsh.com (Norman Walsh) Date: Thu, 08 Mar 2007 14:48:02 -0500 Subject: [Rubygems-developers] request_gem vs. gem In-Reply-To: (rubygems-developers-request@rubyforge.org's message of "Thu\, 08 Mar 2007 13\:54\:17 -0500") References: Message-ID: <87tzwvjz4d.fsf@nwalsh.com> Sorry if this is an FAQ. Web searching wasn't fruitful. Consider the following: $ irb1.8 irb(main):001:0> require "rubygems" => true irb(main):002:0> require_gem "fcgi" (irb):2:Warning: require_gem is obsolete. Use gem instead. => true irb(main):003:0> FCGI => FCGI That seems to work fine, except for the warning about require_gem being obsolete. So consider instead: $ irb1.8 irb(main):001:0> require "rubygems" => true irb(main):002:0> gem "fcgi" => true irb(main):003:0> FCGI NameError: uninitialized constant FCGI from (irb):3 That doesn't seem to work at all. Am I missing something obvious? Be seeing you, norm -- Norman Walsh | Men are more like the times they live http://nwalsh.com/ | in than they are like their | fathers.--Ali Ibn-abi-talib -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available Url : http://rubyforge.org/pipermail/rubygems-developers/attachments/20070308/e329a97d/attachment.bin From darix at web.de Thu Mar 8 16:42:56 2007 From: darix at web.de (Marcus Rueckert) Date: Thu, 8 Mar 2007 22:42:56 +0100 Subject: [Rubygems-developers] request_gem vs. gem In-Reply-To: <87tzwvjz4d.fsf@nwalsh.com> References: <87tzwvjz4d.fsf@nwalsh.com> Message-ID: <20070308214256.GG21493@pixel.global-banlist.de> On 2007-03-08 14:48:02 -0500, Norman Walsh wrote: > $ irb1.8 > irb(main):001:0> require "rubygems" > => true > irb(main):002:0> gem "fcgi" > => true > irb(main):003:0> FCGI > NameError: uninitialized constant FCGI > from (irb):3 > > That doesn't seem to work at all. > > Am I missing something obvious? yes. gem 'fcgi' just tells it what library to use. you need to do require 'fcgi' as last step. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org From halostatue at gmail.com Thu Mar 8 16:55:54 2007 From: halostatue at gmail.com (Austin Ziegler) Date: Thu, 8 Mar 2007 16:55:54 -0500 Subject: [Rubygems-developers] request_gem vs. gem In-Reply-To: <87tzwvjz4d.fsf@nwalsh.com> References: <87tzwvjz4d.fsf@nwalsh.com> Message-ID: <9e7db9110703081355pd248425n88a99a9c0d8d041f@mail.gmail.com> On 3/8/07, Norman Walsh wrote: > Sorry if this is an FAQ. Web searching wasn't fruitful. > Am I missing something obvious? Yes. gem doesn't autorequire. Autorequire was thought to be a good idea, but it turned out to be a mediocre-at-best idea in practice. It is therefore deprecated. So: 1. Don't use #require_gem -- that does autorequire and it will be removed for RubyGems 1.0. 2. Only use #gem when you're trying to fix the gem version to a specific version. The only time when you want to use #gem without a version specification is for gems like soap4r, where partial files are in the standard library but you need to use a wholly different version than is in the standard library. 3. Just use "require 'fcgi'" or whatever the appropriate require for the files contained in the gem are. -austin -- Austin Ziegler * halostatue at gmail.com * http://www.halostatue.ca/ * austin at halostatue.ca * http://www.halostatue.ca/feed/ * austin at zieglers.ca From sconover at gmail.com Mon Mar 12 00:14:04 2007 From: sconover at gmail.com (Steve Conover) Date: Sun, 11 Mar 2007 21:14:04 -0700 Subject: [Rubygems-developers] index_gem_repository problem Message-ID: Anyone run into this? I brought down all gems to my server box, and then, from the directory above it, ran /usr/bin/index_gem_repository.rb -d . After a few minutes I get this stack trace: /usr/local/lib/site_ruby/1.8/rubygems/format.rb:41:in `from_file_by_path': undefined method `include?' for nil:NilClass (NoMethodError) from /usr/bin/index_gem_repository.rb:200:in `build_index' from /usr/bin/index_gem_repository.rb:199:in `build_index' from /usr/bin/index_gem_repository.rb:83:in `build' from /usr/bin/index_gem_repository.rb:80:in `build' from /usr/bin/index_gem_repository.rb:198:in `build_index' from /usr/bin/index_gem_repository.rb:83:in `build' from /usr/bin/index_gem_repository.rb:80:in `build' from /usr/bin/index_gem_repository.rb:197:in `build_index' from /usr/bin/index_gem_repository.rb:297:in `main_index' from /usr/bin/index_gem_repository.rb:301 Has anyone seen this before? My goal is to run my own gem server locally. Is there anything more I need to do besides bring down all the gems, install rubygems (and update it), and run the index script? -Steve From thewoolleyman at gmail.com Mon Mar 12 03:41:18 2007 From: thewoolleyman at gmail.com (Chad Woolley) Date: Mon, 12 Mar 2007 00:41:18 -0700 Subject: [Rubygems-developers] index_gem_repository problem In-Reply-To: References: Message-ID: You can run a server with gem_server as well, but you probably don't want to do that if it's a permanent server. As for your problem with index_gem_repository - did you pull down the whole "1.8" dir? For example, you should have copied "/usr/local/lib/ruby/gems/1.8/" to some dir on your machine. This is the "repository". Under this directory, there will be a "gems" directory (which --help mentions), and also specifications, cache, and doc (and a source_cache file). You need to pass this "1.8" dir (or whatever you renamed it to) as the -d parameter. -- Chad On 3/11/07, Steve Conover wrote: > Anyone run into this? I brought down all gems to my server box, and > then, from the directory above it, ran > > /usr/bin/index_gem_repository.rb -d . > > > After a few minutes I get this stack trace: > > /usr/local/lib/site_ruby/1.8/rubygems/format.rb:41:in > `from_file_by_path': undefined method `include?' for nil:NilClass > (NoMethodError) > from /usr/bin/index_gem_repository.rb:200:in `build_index' > from /usr/bin/index_gem_repository.rb:199:in `build_index' > from /usr/bin/index_gem_repository.rb:83:in `build' > from /usr/bin/index_gem_repository.rb:80:in `build' > from /usr/bin/index_gem_repository.rb:198:in `build_index' > from /usr/bin/index_gem_repository.rb:83:in `build' > from /usr/bin/index_gem_repository.rb:80:in `build' > from /usr/bin/index_gem_repository.rb:197:in `build_index' > from /usr/bin/index_gem_repository.rb:297:in `main_index' > from /usr/bin/index_gem_repository.rb:301 > > Has anyone seen this before? > > My goal is to run my own gem server locally. Is there anything more I > need to do besides bring down all the gems, install rubygems (and > update it), and run the index script? > > -Steve > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > From jim.weirich at gmail.com Mon Mar 12 07:54:38 2007 From: jim.weirich at gmail.com (Jim Weirich) Date: Mon, 12 Mar 2007 07:54:38 -0400 Subject: [Rubygems-developers] index_gem_repository problem In-Reply-To: References: Message-ID: On 3/12/07, Chad Woolley wrote: > As for your problem with index_gem_repository - did you pull down the > whole "1.8" dir? For example, you should have copied > "/usr/local/lib/ruby/gems/1.8/" to some dir on your machine. I don't think this is needed for index_gem_repository. I run my betagems directory with just a single subdirectory containing the .gem files. The index_gem_repository script generates the top level index.html, yaml and yaml.Z files as well as the quick directory and its subdirectories. Your directory structure should be like this: main_directory (this is my betagems directory here) gem (this contains all the .gem files) That should be sufficient. The index_gem_repository script should generate everything else. The main_directory is where the -d option should point. The error is occurring because File.read(file_path, 20) is returning a nil. "file_path" should refer to a .gem file at this point, so I would recommend double check that all the .gem files are readable and have good data (a zero length .gem file could possibly cause this problem). Hope this helps. -- -- Jim Weirich jim at weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) From jim.weirich at gmail.com Mon Mar 12 07:58:47 2007 From: jim.weirich at gmail.com (Jim Weirich) Date: Mon, 12 Mar 2007 07:58:47 -0400 Subject: [Rubygems-developers] index_gem_repository problem In-Reply-To: References: Message-ID: On 3/12/07, Jim Weirich wrote: > [...] > I would recommend double check that all the .gem files are readable and > have good data (a zero length .gem file could possibly cause this > problem). FYI, a quick check on my system shows that a zero length gem file does indeed reproduce the same error you are getting, so that's a good place to start checking. -- -- Jim Weirich jim at weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) From steven at lumos.us Tue Mar 13 17:40:08 2007 From: steven at lumos.us (Steven Lumos) Date: Tue, 13 Mar 2007 14:40:08 -0700 Subject: [Rubygems-developers] Two versions of ruby 1.8.x on same system with working rubygems, possible? References: Message-ID: <86abyg9613.fsf@bitty.lumos.us> "Rick DeNatale" writes: > I might be trying to do something which is impossible. > > I've got both ruby 1.8.5 and 1.8.6 installed on a system as well as > ruby1.9 the libraries are in > > /usr/local/lib/ruby/site_setup > 1.8.5 > 1.8.6 > 1.9 > > I'd like now to install rubygems so that it can be used with either > 1.8.5 OR 1.8.6 but I can't figure out which options to use with > setup.rb in order to do this. I'd be happy if these were two separate > rubygems installs, but it would be great if the gems could be shared > if that made sense. > > Is this even possible? Looking at the code in setup.rb it seems to > disregard the tiny part of the ruby version. > > -- > Rick DeNatale Likely you've already decided not to do this, but I set things up like: /local/ruby-1.8.4/{bin,lib,...} /local/ruby-1.8.5-p12/{bin,lib,...} I have many versions installed this way--including various CVS checkouts--going back to 1.6.4. Usually, the 'official' version has a /local/ruby symlink, and is automatically on everyone's path. There's definitely no sharing going on, because an experimental (from our point of view) version of Ruby probably means experimental versions of libraries too. However, in principle you should be able to link the various share dirs to a central one. I don't know how much people worry about sharing share these days. Our data is larger than all of Ruby with many gems installed by a factor of 10,000.... Steve From sconover at gmail.com Wed Mar 14 00:18:30 2007 From: sconover at gmail.com (Steve Conover) Date: Tue, 13 Mar 2007 21:18:30 -0700 Subject: [Rubygems-developers] index_gem_repository problem In-Reply-To: References: Message-ID: Zero-length files did it but a bunch of others did too. I threw a begin-rescue around that block and printed out all the gems I get exceptions from. Perhaps it's the place I rsync'ed from? I did the following: rsync -av rsync://rubyforge.lauschmusik.de/gems/ . I'm on ubuntu dapper using ruby 1.8.4. I've rsync'ed a couple times and had the same results. Thanks for your help. -Steve Here's the list: ./gems/Pn4-0.1.0-win32-1.8.4-VC6.gem had a problem, skipping ./gems/bcrypt-ruby-1.0.0.gem had a problem, skipping ./gems/bcrypt-ruby-2.0.0.gem had a problem, skipping ./gems/bcrypt-ruby-2.0.1.gem had a problem, skipping ./gems/core_ex-0.1.2.gem had a problem, skipping ./gems/pqa-1.6.gem had a problem, skipping ./gems/rant-0.3.0.gem had a problem, skipping ./gems/rant-0.3.2.gem had a problem, skipping ./gems/rant-0.3.4.gem had a problem, skipping ./gems/rant-0.3.6.gem had a problem, skipping ./gems/rant-0.3.8.gem had a problem, skipping ./gems/rant-0.4.0.gem had a problem, skipping ./gems/rant-0.4.2.gem had a problem, skipping ./gems/rant-0.4.4.gem had a problem, skipping ./gems/rant-0.4.6.gem had a problem, skipping ./gems/rant-0.4.8.gem had a problem, skipping ./gems/rant-0.5.0.gem had a problem, skipping ./gems/rant-0.5.2.gem had a problem, skipping ./gems/rant-0.5.4.gem had a problem, skipping ./gems/rant-0.5.6.gem had a problem, skipping ./gems/rant-0.5.7.gem had a problem, skipping ./gems/rspec-0.7.0.gem had a problem, skipping ./gems/rspec-0.7.1.gem had a problem, skipping ./gems/rspec-0.7.2.gem had a problem, skipping ./gems/rspec-0.7.3.gem had a problem, skipping ./gems/rspec-0.7.4.gem had a problem, skipping ./gems/rspec-0.7.5.1.gem had a problem, skipping ./gems/rspec-0.7.5.gem had a problem, skipping ./gems/rspec-0.8.0.gem had a problem, skipping ./gems/rspec-0.8.1.gem had a problem, skipping ./gems/rspec-0.8.2.gem had a problem, skipping ./gems/ruby_ex-0.1.1.gem had a problem, skipping ./gems/statemachine-0.0.0.gem had a problem, skipping ./gems/statemachine-0.0.1.gem had a problem, skipping ./gems/stompserver-0.9.0.gem had a problem, skipping ./gems/win32screenshot-0.0.3.gem had a problem, skipping On 3/12/07, Jim Weirich wrote: > On 3/12/07, Jim Weirich wrote: > > [...] > > I would recommend double check that all the .gem files are readable and > > have good data (a zero length .gem file could possibly cause this > > problem). > > FYI, a quick check on my system shows that a zero length gem file does > indeed reproduce the same error you are getting, so that's a good > place to start checking. > > -- > -- Jim Weirich jim at weirichhouse.org http://onestepback.org > ----------------------------------------------------------------- > "Beware of bugs in the above code; I have only proved it correct, > not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > From phurley at gmail.com Wed Mar 14 17:47:55 2007 From: phurley at gmail.com (Patrick Hurley) Date: Wed, 14 Mar 2007 17:47:55 -0400 Subject: [Rubygems-developers] Automating gems Message-ID: <554ac39c0703141447r2b28a4c0rc7bf703b17dd7fb1@mail.gmail.com> Sorry, if I should have been able to find some docs to point me in the right direction, but so far here is what I figured out from trial and error and some source code reading. I want to unpack a gem already on my machine: gem unpack a_gem Then I want to retrieve the gem spec gem specification a_gem (then more stuff but this will get me started) So far I have the simple code: require "rubygems" Gem.manage_gems if gem = ARGV.first puts "Processing #{gem}" runner = Gem::GemRunner.new puts "Unpack #{gem}" runner.run ['unpack', gem] runner.run(['specification', gem]) end This works; however, the run command displays to the screen. Is there an easy way to capture its output? I see there is a default interface object, with a method called say I could grab, but that seems pretty messy. I could also grab the stdout handle and play games there, but again, I feel I am missing something. Thanks in advance for your time pth From thewoolleyman at gmail.com Thu Mar 15 05:04:28 2007 From: thewoolleyman at gmail.com (Chad Woolley) Date: Thu, 15 Mar 2007 02:04:28 -0700 Subject: [Rubygems-developers] Automating gems In-Reply-To: <554ac39c0703141447r2b28a4c0rc7bf703b17dd7fb1@mail.gmail.com> References: <554ac39c0703141447r2b28a4c0rc7bf703b17dd7fb1@mail.gmail.com> Message-ID: You can create your own implementation of StreamUI. and use that in place of the default StreamUI in Gem::CommandManager. That may seem "messy, but I believe this is the mechanism that was built into rubygems for doing this, and it works pretty well - except for where someone forgot to use it - see http://rubyforge.org/tracker/index.php?func=detail&aid=9020&group_id=126&atid=577 For an example of overriding StreamUI to intercept the IO streams, check out geminstaller.rubyforge.org, and look at gem_runner_proxy, and enhanced_stream_ui. -- Chad On 3/14/07, Patrick Hurley wrote: > Sorry, if I should have been able to find some docs to point me in the > right direction, but so far here is what I figured out from trial and > error and some source code reading. > > I want to unpack a gem already on my machine: > gem unpack a_gem > > Then I want to retrieve the gem spec > gem specification a_gem > > (then more stuff but this will get me started) > > So far I have the simple code: > > require "rubygems" > Gem.manage_gems > > if gem = ARGV.first > puts "Processing #{gem}" > runner = Gem::GemRunner.new > puts "Unpack #{gem}" > runner.run ['unpack', gem] > runner.run(['specification', gem]) > end > > This works; however, the run command displays to the screen. Is there > an easy way to capture its output? I see there is a default interface > object, with a method called say I could grab, but that seems pretty > messy. I could also grab the stdout handle and play games there, but > again, I feel I am missing something. > > Thanks in advance for your time > pth > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > From weyus at att.net Fri Mar 16 15:12:02 2007 From: weyus at att.net (Wes Gamble) Date: Fri, 16 Mar 2007 19:12:02 +0000 Subject: [Rubygems-developers] Gem repository and/or local gem installation issues Message-ID: <031620071912.26114.45FAEC02000586F00000660221587667209C9A970A99@att.net> All, I've attempted to update several gems and I keep getting an "invalid gem format" error. Below is the output of my various gem update commands. gem 0.9.2 Windows XP Is there something going on with the repository or is the problem with my local installation? If the problem is local, how should I go about debugging it? Thanks, Wes ======================================== C:\eclipse\workspace>gem update rubyful_soup Updating installed gems... Attempting remote update of rubyful_soup ERROR: While executing gem ... (Gem::InstallError) invalid gem format for c:/ruby/lib/ruby/gems/1.8/cache/rubyful_soup-1.0.4.gem C:\eclipse\workspace>gem update rake Updating installed gems... Attempting remote update of rake ERROR: While executing gem ... (Gem::InstallError) invalid gem format for c:/ruby/lib/ruby/gems/1.8/cache/rake-0.7.2.gem C:\eclipse\workspace>gem update Updating installed gems... Attempting remote update of actionmailer Install required dependency actionpack? [Yn] Y Install required dependency activesupport? [Yn] Y ERROR: While executing gem ... (Gem::InstallError) invalid gem format for c:/ruby/lib/ruby/gems/1.8/cache/activesupport-1.4.2.gem From weyus at att.net Fri Mar 16 15:19:36 2007 From: weyus at att.net (Wes Gamble) Date: Fri, 16 Mar 2007 19:19:36 +0000 Subject: [Rubygems-developers] Gem repository and/or local gem installation issues Message-ID: <031620071919.3597.45FAEDC80000BAA300000E0D21587667209C9A970A99@att.net> This may be due to firewall issues on my side. Does that sound right? WG -------------- Original message ---------------------- From: weyus at att.net (Wes Gamble) > > All, > > I've attempted to update several gems and I keep getting an "invalid gem format" > error. Below is the output of my various gem update commands. > > gem 0.9.2 > Windows XP > > Is there something going on with the repository or is the problem with my local > installation? If the problem is local, how should I go about debugging it? > > Thanks, > Wes > ======================================== > C:\eclipse\workspace>gem update rubyful_soup > Updating installed gems... > Attempting remote update of rubyful_soup > ERROR: While executing gem ... (Gem::InstallError) > invalid gem format for > c:/ruby/lib/ruby/gems/1.8/cache/rubyful_soup-1.0.4.gem > > C:\eclipse\workspace>gem update rake > Updating installed gems... > Attempting remote update of rake > ERROR: While executing gem ... (Gem::InstallError) > invalid gem format for c:/ruby/lib/ruby/gems/1.8/cache/rake-0.7.2.gem > > C:\eclipse\workspace>gem update > Updating installed gems... > Attempting remote update of actionmailer > Install required dependency actionpack? [Yn] Y > Install required dependency activesupport? [Yn] Y > ERROR: While executing gem ... (Gem::InstallError) > invalid gem format for > c:/ruby/lib/ruby/gems/1.8/cache/activesupport-1.4.2.gem > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers From weyus at att.net Fri Mar 16 15:46:36 2007 From: weyus at att.net (Wes Gamble) Date: Fri, 16 Mar 2007 19:46:36 +0000 Subject: [Rubygems-developers] Gem repository and/or local gem installation issues Message-ID: <031620071946.3083.45FAF41C00068AF300000C0B21587667209C9A970A99@att.net> I think we've ruled the firewall out. Is there a way to blow away my local gem index? I can't find any instructions in the rubygems manual online? Thanks, WG -------------- Original message ---------------------- From: weyus at att.net (Wes Gamble) > > This may be due to firewall issues on my side. Does that sound right? > > WG > > -------------- Original message ---------------------- > From: weyus at att.net (Wes Gamble) > > > > All, > > > > I've attempted to update several gems and I keep getting an "invalid gem > format" > > error. Below is the output of my various gem update commands. > > > > gem 0.9.2 > > Windows XP > > > > Is there something going on with the repository or is the problem with my > local > > installation? If the problem is local, how should I go about debugging it? > > > > Thanks, > > Wes > > ======================================== > > C:\eclipse\workspace>gem update rubyful_soup > > Updating installed gems... > > Attempting remote update of rubyful_soup > > ERROR: While executing gem ... (Gem::InstallError) > > invalid gem format for > > c:/ruby/lib/ruby/gems/1.8/cache/rubyful_soup-1.0.4.gem > > > > C:\eclipse\workspace>gem update rake > > Updating installed gems... > > Attempting remote update of rake > > ERROR: While executing gem ... (Gem::InstallError) > > invalid gem format for c:/ruby/lib/ruby/gems/1.8/cache/rake-0.7.2.gem > > > > C:\eclipse\workspace>gem update > > Updating installed gems... > > Attempting remote update of actionmailer > > Install required dependency actionpack? [Yn] Y > > Install required dependency activesupport? [Yn] Y > > ERROR: While executing gem ... (Gem::InstallError) > > invalid gem format for > > c:/ruby/lib/ruby/gems/1.8/cache/activesupport-1.4.2.gem > > _______________________________________________ > > Rubygems-developers mailing list > > Rubygems-developers at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rubygems-developers > > > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers From weyus at att.net Fri Mar 16 16:53:13 2007 From: weyus at att.net (Wes Gamble) Date: Fri, 16 Mar 2007 20:53:13 +0000 Subject: [Rubygems-developers] Gem repository and/or local gem installation issues Message-ID: <031620072053.10588.45FB03B90007235F0000295C21587667209C9A970A99@att.net> I had to revert back to 0.9.0 to get gem to work again. Looks like there are a lot of issues w/0.9.2 at least. Maybe 0.9.1 as well on Win XP? Any insight into the quality of 0.9.1/0.9.2. Thanks, Wes -------------- Original message ---------------------- From: weyus at att.net (Wes Gamble) > > I think we've ruled the firewall out. Is there a way to blow away my local gem > index? I can't find any instructions in the rubygems manual online? > > Thanks, > WG > > -------------- Original message ---------------------- > From: weyus at att.net (Wes Gamble) > > > > This may be due to firewall issues on my side. Does that sound right? > > > > WG > > > > -------------- Original message ---------------------- > > From: weyus at att.net (Wes Gamble) > > > > > > All, > > > > > > I've attempted to update several gems and I keep getting an "invalid gem > > format" > > > error. Below is the output of my various gem update commands. > > > > > > gem 0.9.2 > > > Windows XP > > > > > > Is there something going on with the repository or is the problem with my > > local > > > installation? If the problem is local, how should I go about debugging it? > > > > > > Thanks, > > > Wes > > > ======================================== > > > C:\eclipse\workspace>gem update rubyful_soup > > > Updating installed gems... > > > Attempting remote update of rubyful_soup > > > ERROR: While executing gem ... (Gem::InstallError) > > > invalid gem format for > > > c:/ruby/lib/ruby/gems/1.8/cache/rubyful_soup-1.0.4.gem > > > > > > C:\eclipse\workspace>gem update rake > > > Updating installed gems... > > > Attempting remote update of rake > > > ERROR: While executing gem ... (Gem::InstallError) > > > invalid gem format for c:/ruby/lib/ruby/gems/1.8/cache/rake-0.7.2.gem > > > > > > C:\eclipse\workspace>gem update > > > Updating installed gems... > > > Attempting remote update of actionmailer > > > Install required dependency actionpack? [Yn] Y > > > Install required dependency activesupport? [Yn] Y > > > ERROR: While executing gem ... (Gem::InstallError) > > > invalid gem format for > > > c:/ruby/lib/ruby/gems/1.8/cache/activesupport-1.4.2.gem > > > _______________________________________________ > > > Rubygems-developers mailing list > > > Rubygems-developers at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rubygems-developers > > > > > > _______________________________________________ > > Rubygems-developers mailing list > > Rubygems-developers at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rubygems-developers > > > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers From Daniel.Berger at qwest.com Fri Mar 16 17:05:06 2007 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Fri, 16 Mar 2007 16:05:06 -0500 Subject: [Rubygems-developers] Gem repository and/or local geminstallation issues In-Reply-To: <031620072053.10588.45FB03B90007235F0000295C21587667209C9A970A99@att.net> Message-ID: <7524A45A1A5B264FA4809E2156496CFB0D0F0B@ITOMAE2KM01.AD.QINTRA.COM> > -----Original Message----- > From: rubygems-developers-bounces at rubyforge.org > [mailto:rubygems-developers-bounces at rubyforge.org] On Behalf > Of Wes Gamble > Sent: Friday, March 16, 2007 2:53 PM > To: rubygems-developers at rubyforge.org > Subject: Re: [Rubygems-developers] Gem repository and/or > local geminstallation issues > > > I had to revert back to 0.9.0 to get gem to work again. > > Looks like there are a lot of issues w/0.9.2 at least. Maybe > 0.9.1 as well on Win XP? > > Any insight into the quality of 0.9.1/0.9.2. I've not had problems with it myself. BTW, what version of Ruby? In the past whenever I get bizarre errors from rubygems, deleting the source_cache often helps. :) Random guess: binary mode. Regards, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. From weyus at att.net Fri Mar 16 17:36:02 2007 From: weyus at att.net (Wes Gamble) Date: Fri, 16 Mar 2007 21:36:02 +0000 Subject: [Rubygems-developers] Gem repository and/or local geminstallation issues Message-ID: <031620072136.22799.45FB0DC10009ED420000590F21587667209C9A970A99@att.net> Ruby 1.8.4. Can you say more about "binary mode" - is there some setting that I should verify or need to change? If so, why would the default be different b/w 0.9.0 and 0.9.1/0.9.2 (since I didn't customize any of those installs of rubygems)? WG -------------- Original message ---------------------- From: "Berger, Daniel" > > > -----Original Message----- > > From: rubygems-developers-bounces at rubyforge.org > > [mailto:rubygems-developers-bounces at rubyforge.org] On Behalf > > Of Wes Gamble > > Sent: Friday, March 16, 2007 2:53 PM > > To: rubygems-developers at rubyforge.org > > Subject: Re: [Rubygems-developers] Gem repository and/or > > local geminstallation issues > > > > > > I had to revert back to 0.9.0 to get gem to work again. > > > > Looks like there are a lot of issues w/0.9.2 at least. Maybe > > 0.9.1 as well on Win XP? > > > > Any insight into the quality of 0.9.1/0.9.2. > > I've not had problems with it myself. BTW, what version of Ruby? > > In the past whenever I get bizarre errors from rubygems, deleting the > source_cache often helps. :) > > Random guess: binary mode. > > Regards, > > Dan > > > This communication is the property of Qwest and may contain confidential or > privileged information. Unauthorized use of this communication is strictly > prohibited and may be unlawful. If you have received this communication > in error, please immediately notify the sender by reply e-mail and destroy > all copies of the communication and any attachments. > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers From drbrain at segment7.net Sat Mar 17 07:52:56 2007 From: drbrain at segment7.net (Eric Hodel) Date: Sat, 17 Mar 2007 04:52:56 -0700 Subject: [Rubygems-developers] Automating gems In-Reply-To: <554ac39c0703141447r2b28a4c0rc7bf703b17dd7fb1@mail.gmail.com> References: <554ac39c0703141447r2b28a4c0rc7bf703b17dd7fb1@mail.gmail.com> Message-ID: On Mar 14, 2007, at 14:47, Patrick Hurley wrote: > Sorry, if I should have been able to find some docs to point me in the > right direction, but so far here is what I figured out from trial and > error and some source code reading. > > I want to unpack a gem already on my machine: > gem unpack a_gem > > Then I want to retrieve the gem spec > gem specification a_gem > > (then more stuff but this will get me started) > > So far I have the simple code: > > require "rubygems" > Gem.manage_gems > > if gem = ARGV.first > puts "Processing #{gem}" > runner = Gem::GemRunner.new > puts "Unpack #{gem}" > runner.run ['unpack', gem] > runner.run(['specification', gem]) > end > > This works; however, the run command displays to the screen. Is there > an easy way to capture its output? I see there is a default interface > object, with a method called say I could grab, but that seems pretty > messy. I could also grab the stdout handle and play games there, but > again, I feel I am missing something. Don't use the runner interface at all, it doesn't do anything you need, and adds a bunch of crap you don't (redirecting output). Just call the Gem::Installer#unpack method directly. $ ri Gem::Installer#unpack -------------------------------------------------- Gem::Installer#unpack unpack(directory) ------------------------------------------------------------------------ Unpacks the gem into the given directory. Just use to_yaml or to_ruby on Gem::Specification. From drbrain at segment7.net Sat Mar 17 07:54:59 2007 From: drbrain at segment7.net (Eric Hodel) Date: Sat, 17 Mar 2007 04:54:59 -0700 Subject: [Rubygems-developers] Two versions of ruby 1.8.x on same system with working rubygems, possible? In-Reply-To: References: Message-ID: <10F27F58-B41A-4740-ADDE-9DC058479410@segment7.net> On Mar 7, 2007, at 09:28, Rick DeNatale wrote: > I might be trying to do something which is impossible. > > I've got both ruby 1.8.5 and 1.8.6 installed on a system as well as > ruby1.9 the libraries are in > > /usr/local/lib/ruby/site_setup > 1.8.5 > 1.8.6 > 1.9 > > I'd like now to install rubygems so that it can be used with either > 1.8.5 OR 1.8.6 but I can't figure out which options to use with > setup.rb in order to do this. I'd be happy if these were two separate > rubygems installs, but it would be great if the gems could be shared > if that made sense. > > Is this even possible? Looking at the code in setup.rb it seems to > disregard the tiny part of the ruby version. Install it outside of ruby's site_lib and add the path to it via RUBYLIB or -I. I think that means --prefix. From thewoolleyman at gmail.com Sat Mar 17 12:07:53 2007 From: thewoolleyman at gmail.com (Chad Woolley) Date: Sat, 17 Mar 2007 09:07:53 -0700 Subject: [Rubygems-developers] Automating gems In-Reply-To: References: <554ac39c0703141447r2b28a4c0rc7bf703b17dd7fb1@mail.gmail.com> Message-ID: On 3/17/07, Eric Hodel wrote: > On Mar 14, 2007, at 14:47, Patrick Hurley wrote: > > > Sorry, if I should have been able to find some docs to point me in the > > right direction, but so far here is what I figured out from trial and > > error and some source code reading. > > > > I want to unpack a gem already on my machine: > > gem unpack a_gem > > > > Then I want to retrieve the gem spec > > gem specification a_gem > > > > (then more stuff but this will get me started) > > > > So far I have the simple code: > > > > require "rubygems" > > Gem.manage_gems > > > > if gem = ARGV.first > > puts "Processing #{gem}" > > runner = Gem::GemRunner.new > > puts "Unpack #{gem}" > > runner.run ['unpack', gem] > > runner.run(['specification', gem]) > > end > > > > This works; however, the run command displays to the screen. Is there > > an easy way to capture its output? I see there is a default interface > > object, with a method called say I could grab, but that seems pretty > > messy. I could also grab the stdout handle and play games there, but > > again, I feel I am missing something. > > Don't use the runner interface at all, it doesn't do anything you > need, and adds a bunch of crap you don't (redirecting output). > > Just call the Gem::Installer#unpack method directly. > > $ ri Gem::Installer#unpack > -------------------------------------------------- Gem::Installer#unpack > unpack(directory) > ------------------------------------------------------------------------ > Unpacks the gem into the given directory. > > Just use to_yaml or to_ruby on Gem::Specification. This will work because the unpack command doesn't use stdin or stdout, it only throws exceptions (that I see). I think the original poster indicated that he wanted to do more eventually, though. If he wants to automate stuff like installing/uninstalling gems, *especially* multiplatform gems, then he will have to override the default ui in user_interaction to capture the output. In the case of multiplatform gems, there is currently no way to specify a platform via the installer API, so you must deal with the input and output stream in order to parse and respond to the lists of non-ruby-platform gems that are presented. You don't have to use gem_runner, you can use installer directly. In my case, it was just easier to use gem_runner directly in my case, because I wanted to preserve the original rubygems config and arg behavior as much as possible, and try to stay close to the "edge" of the internal API (to avoid breaking if the deeper API implementation changes over time). You still have to use a custom ui implementation to interact with install/uninstall, though. -- Chad From phurley at gmail.com Sat Mar 17 17:44:25 2007 From: phurley at gmail.com (Patrick Hurley) Date: Sat, 17 Mar 2007 17:44:25 -0400 Subject: [Rubygems-developers] Automating gems In-Reply-To: References: <554ac39c0703141447r2b28a4c0rc7bf703b17dd7fb1@mail.gmail.com> Message-ID: <554ac39c0703171444v115e312fvd12119e51f7b524a@mail.gmail.com> On 3/17/07, Eric Hodel wrote: > On Mar 14, 2007, at 14:47, Patrick Hurley wrote: > > > Sorry, if I should have been able to find some docs to point me in the > > right direction, but so far here is what I figured out from trial and > > error and some source code reading. > > > > I want to unpack a gem already on my machine: > > gem unpack a_gem > > > > Then I want to retrieve the gem spec > > gem specification a_gem > > > > (then more stuff but this will get me started) > > > > So far I have the simple code: > > > > require "rubygems" > > Gem.manage_gems > > > > if gem = ARGV.first > > puts "Processing #{gem}" > > runner = Gem::GemRunner.new > > puts "Unpack #{gem}" > > runner.run ['unpack', gem] > > runner.run(['specification', gem]) > > end > > > > This works; however, the run command displays to the screen. Is there > > an easy way to capture its output? I see there is a default interface > > object, with a method called say I could grab, but that seems pretty > > messy. I could also grab the stdout handle and play games there, but > > again, I feel I am missing something. > > Don't use the runner interface at all, it doesn't do anything you > need, and adds a bunch of crap you don't (redirecting output). > > Just call the Gem::Installer#unpack method directly. > > $ ri Gem::Installer#unpack > -------------------------------------------------- Gem::Installer#unpack > unpack(directory) > ------------------------------------------------------------------------ > Unpacks the gem into the given directory. > > Just use to_yaml or to_ruby on Gem::Specification. > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > Thanks, this looks much closer to what I was hoping. My goal is to (in an automated fashion), build a binary gem, save all of the generated files and the original gem into a platform specific gem, that can then be installed on servers without a C compiler. Thanks pth From Daniel.Berger at qwest.com Mon Mar 19 10:10:00 2007 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Mon, 19 Mar 2007 09:10:00 -0500 Subject: [Rubygems-developers] Gem repository and/or localgeminstallation issues In-Reply-To: <031620072136.22799.45FB0DC10009ED420000590F21587667209C9A970A99@att.net> Message-ID: <7524A45A1A5B264FA4809E2156496CFB0D0F0D@ITOMAE2KM01.AD.QINTRA.COM> > -----Original Message----- > From: rubygems-developers-bounces at rubyforge.org > [mailto:rubygems-developers-bounces at rubyforge.org] On Behalf > Of Wes Gamble > Sent: Friday, March 16, 2007 3:36 PM > To: rubygems-developers at rubyforge.org > Subject: Re: [Rubygems-developers] Gem repository and/or > localgeminstallation issues > > > Ruby 1.8.4. > > Can you say more about "binary mode" - is there some setting > that I should verify or need to change? If so, why would the > default be different b/w 0.9.0 and 0.9.1/0.9.2 (since I > didn't customize any of those installs of rubygems)? I meant that my guess as to the cause of the failures might be the lack of binary mode in a File.open call somewhere in the Rubygems code itself. But that's a stab in the dark. There is no 'binary mode' for gems itself. Sorry for the confusion. Regards, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. From olivier.boudry at gmail.com Mon Mar 19 10:58:12 2007 From: olivier.boudry at gmail.com (Olivier Boudry) Date: Mon, 19 Mar 2007 10:58:12 -0400 Subject: [Rubygems-developers] Having dynamic libraries installed in the bin directory without having them put in ruby's search path? Message-ID: Hello, I'm building the win32 gems for the SAP Rfc connector (a tool to perform remote function calls on a SAP R/3 system). I would need to have dll files placed into the ruby\bin directory. I tried to list them in spec.executables but encountered another problem. The module name (and main .rb file) is the same as the name of one of the dll's. As the gem's bin directory is added to ruby's search path when I try to load the module, ruby tries to load the dll instead of loading the .rb file. I tried to rename the bin directory using the spec.bindir variable, but the new folder's name is also added to the module search path. Is there a way to have files placed into the bin directory without them being added to ruby module search path? I'm not sure the module's author will want to rename his module just to solve this problem. ;-) Thanks, Olivier. From drbrain at segment7.net Mon Mar 19 16:32:21 2007 From: drbrain at segment7.net (Eric Hodel) Date: Mon, 19 Mar 2007 13:32:21 -0700 Subject: [Rubygems-developers] Having dynamic libraries installed in the bin directory without having them put in ruby's search path? In-Reply-To: References: Message-ID: <2721B38B-30C3-4C19-9073-3E896EF04D1D@segment7.net> On Mar 19, 2007, at 07:58, Olivier Boudry wrote: > I'm building the win32 gems for the SAP Rfc connector (a tool to > perform remote function calls on a SAP R/3 system). I would need to > have dll files placed into the ruby\bin directory. How do you run a shared library? From olivier.boudry at gmail.com Mon Mar 19 16:38:43 2007 From: olivier.boudry at gmail.com (Olivier Boudry) Date: Mon, 19 Mar 2007 16:38:43 -0400 Subject: [Rubygems-developers] Having dynamic libraries installed in the bin directory without having them put in ruby's search path? In-Reply-To: <2721B38B-30C3-4C19-9073-3E896EF04D1D@segment7.net> References: <2721B38B-30C3-4C19-9073-3E896EF04D1D@segment7.net> Message-ID: I don't run them, but putting them as executables in the gemspec was the only way I found to get them installed in the ruby\bin directory. Also I know this is not the purpose of the executables parameter. On 3/19/07, Eric Hodel wrote: > On Mar 19, 2007, at 07:58, Olivier Boudry wrote: > > I'm building the win32 gems for the SAP Rfc connector (a tool to > > perform remote function calls on a SAP R/3 system). I would need to > > have dll files placed into the ruby\bin directory. > > How do you run a shared library? > > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > From drbrain at segment7.net Mon Mar 19 19:31:05 2007 From: drbrain at segment7.net (Eric Hodel) Date: Mon, 19 Mar 2007 16:31:05 -0700 Subject: [Rubygems-developers] Having dynamic libraries installed in the bin directory without having them put in ruby's search path? In-Reply-To: References: <2721B38B-30C3-4C19-9073-3E896EF04D1D@segment7.net> Message-ID: <6684D1A5-7CF0-445C-9057-AA765A25442E@segment7.net> On Mar 19, 2007, at 13:38, Olivier Boudry wrote: > On 3/19/07, Eric Hodel wrote: >> On Mar 19, 2007, at 07:58, Olivier Boudry wrote: >>> I'm building the win32 gems for the SAP Rfc connector (a tool to >>> perform remote function calls on a SAP R/3 system). I would need to >>> have dll files placed into the ruby\bin directory. >> >> How do you run a shared library? > > I don't run them, but putting them as executables in the gemspec was > the only way I found to get them installed in the ruby\bin directory. > Also I know this is not the purpose of the executables parameter. So if you don't run them why are they in the bin dir? Why aren't they in the lib dir? From olivier.boudry at gmail.com Mon Mar 19 22:21:48 2007 From: olivier.boudry at gmail.com (Olivier Boudry) Date: Mon, 19 Mar 2007 22:21:48 -0400 Subject: [Rubygems-developers] Having dynamic libraries installed in the bin directory without having them put in ruby's search path? In-Reply-To: <6684D1A5-7CF0-445C-9057-AA765A25442E@segment7.net> References: <2721B38B-30C3-4C19-9073-3E896EF04D1D@segment7.net> <6684D1A5-7CF0-445C-9057-AA765A25442E@segment7.net> Message-ID: Yes they should go in the lib dir if I was not using Windows. Windows searches for DLLs only in the system folder, in the applications directory (ruby.exe) and in the location specified in the PATH variable. If you have a look at files in the Ruby One Click Installer for Windows you'll notice that all DLL required by preinstalled modules (gdbm.dll, iconv.dll, libeay32.dll, zlib1.dll, ...) are placed in the bin directory. They are not executable but if you don't place them along the ruby.exe file the OS will not find them and you'll end-up with a load error. I know my question is very Windows centric, because with other OS you would never put libraries in the same folder as executables files. Placing DLLs in the bin folder is probably not "state of the art" but it would allow shipping binary win32 gems that contains all the required dependencies and don't require additional application or libraries installation. So I was just wondering if it was available in gemspec. Cheers, Olivier. On 3/19/07, Eric Hodel wrote: > On Mar 19, 2007, at 13:38, Olivier Boudry wrote: > > On 3/19/07, Eric Hodel wrote: > >> On Mar 19, 2007, at 07:58, Olivier Boudry wrote: > >>> I'm building the win32 gems for the SAP Rfc connector (a tool to > >>> perform remote function calls on a SAP R/3 system). I would need to > >>> have dll files placed into the ruby\bin directory. > >> > >> How do you run a shared library? > > > > I don't run them, but putting them as executables in the gemspec was > > the only way I found to get them installed in the ruby\bin directory. > > Also I know this is not the purpose of the executables parameter. > > So if you don't run them why are they in the bin dir? Why aren't > they in the lib dir? > > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > From drbrain at segment7.net Tue Mar 20 01:38:59 2007 From: drbrain at segment7.net (Eric Hodel) Date: Mon, 19 Mar 2007 22:38:59 -0700 Subject: [Rubygems-developers] Having dynamic libraries installed in the bin directory without having them put in ruby's search path? In-Reply-To: References: <2721B38B-30C3-4C19-9073-3E896EF04D1D@segment7.net> <6684D1A5-7CF0-445C-9057-AA765A25442E@segment7.net> Message-ID: <70CD56A3-906C-4806-AB8A-DE5BB07F0893@segment7.net> Stop top posting. On Mar 19, 2007, at 19:21, Olivier Boudry wrote: > On 3/19/07, Eric Hodel wrote: >> On Mar 19, 2007, at 13:38, Olivier Boudry wrote: >>> On 3/19/07, Eric Hodel wrote: >>>> On Mar 19, 2007, at 07:58, Olivier Boudry wrote: >>>>> I'm building the win32 gems for the SAP Rfc connector (a tool to >>>>> perform remote function calls on a SAP R/3 system). I would >>>>> need to >>>>> have dll files placed into the ruby\bin directory. >>>> >>>> How do you run a shared library? >>> >>> I don't run them, but putting them as executables in the gemspec was >>> the only way I found to get them installed in the ruby\bin >>> directory. >>> Also I know this is not the purpose of the executables parameter. >> >> So if you don't run them why are they in the bin dir? Why aren't >> they in the lib dir? > > Yes they should go in the lib dir if I was not using Windows. Windows > searches for DLLs only in the system folder, in the applications > directory (ruby.exe) and in the location specified in the PATH > variable. > > If you have a look at files in the Ruby One Click Installer for > Windows you'll notice that all DLL required by preinstalled modules > (gdbm.dll, iconv.dll, libeay32.dll, zlib1.dll, ...) are placed in the > bin directory. They are not executable but if you don't place them > along the ruby.exe file the OS will not find them and you'll end-up > with a load error. Now I'm confused. I was assuming you were dealing with shared libraries that would be loaded by require, not shared libraries that would be loaded by another shared library like ruby's shared libraries which live in C:\ruby\lib\ruby\1.8\i386-mswin32. Is it correct that the shared libraries you are trying to put in the bin dir will not be loaded by require, but indirectly? > I know my question is very Windows centric, because with other OS you > would never put libraries in the same folder as executables files. > > Placing DLLs in the bin folder is probably not "state of the art" but > it would allow shipping binary win32 gems that contains all the > required dependencies and don't require additional application or > libraries installation. So I was just wondering if it was available in > gemspec. If you have two shared libraries to load, one via require and the other via the required shared library give them different names (like zlib1.dll and zlib.so). It'll be a much simpler solution. Also, how does ruby get away with having zlib.so in a directory that's not in ENV['PATH']? Can you use the same trick? From olivier.boudry at gmail.com Tue Mar 20 08:20:12 2007 From: olivier.boudry at gmail.com (Olivier Boudry) Date: Tue, 20 Mar 2007 08:20:12 -0400 Subject: [Rubygems-developers] Having dynamic libraries installed in the bin directory without having them put in ruby's search path? In-Reply-To: <70CD56A3-906C-4806-AB8A-DE5BB07F0893@segment7.net> References: <2721B38B-30C3-4C19-9073-3E896EF04D1D@segment7.net> <6684D1A5-7CF0-445C-9057-AA765A25442E@segment7.net> <70CD56A3-906C-4806-AB8A-DE5BB07F0893@segment7.net> Message-ID: > If you have two shared libraries to load, one via require and the > other via the required shared library give them different names (like > zlib1.dll and zlib.so). It'll be a much simpler solution. You're right, it's much simple and probably the only way to get it to work properly. > Also, how does ruby get away with having zlib.so in a directory > that's not in ENV['PATH']? Can you use the same trick? zlib.so is in the ruby search path (for searching ruby modules) and zlib1.dll is in the bin directory. At least when installed with the One Click Installer. Thanks for your help, Cheers, Olivier. From peter_marklund at fastmail.fm Tue Mar 20 17:11:09 2007 From: peter_marklund at fastmail.fm (Peter Marklund) Date: Tue, 20 Mar 2007 22:11:09 +0100 Subject: [Rubygems-developers] LoadError in nested require causes silent failure In-Reply-To: References: Message-ID: I tried reproducing this problem without Rails as Eric Hodel suggested and it turned out that the problem has gone away with Ruby 1.8.5. Suppose you have a file test.rb with only one line: require 'this_file_does_not_exist' Then in Ruby 1.8.4 you would get: $ irb irb(main):001:0> require 'test' LoadError: no such file to load -- this_file_does_not_exist from ./test.rb:1:in `require' from ./test.rb:1 from (irb):1 irb(main):002:0> require 'test' => false Which means that the second time you require a file that had had a require statement in it that throws a LoadError Ruby would return false indicating that the file had already been loaded. If the test file had been in a Ruby gem then since the RubyGems require method catches the first LoadError no LoadError would have been thrown for the first invocation, thus the silent failure. With Ruby 1.8.5 on the other hand the LoadError will be thrown on the second require as well and so the silent failure goes away since now the second time the RubyGems require method invokes the Ruby require method the LoadError is thrown and propagated. So to sum up then, the problem has gone away, and all is good and well. Regards Peter On Jan 29, 2007, at 9:13 PM, Peter Marklund wrote: > Hi! > I've thought a bit more about how RubyGems overrides the Ruby > require method and how it deals with LoadErrors and it seems to me > that there is general issue with the contract of the Ruby require > method being changed, and also, and more seriously, of silent > failures. Consider the following example. We have a system with the > Rails gem installed and the file test_helper.rb can be found in > that gem. Suppose we have a file in the current directory called > test_helper.rb that only contains: > > require 'b' > > where the file b doesn't exist. Then, with RubyGems no exception is > thrown when requiring the test_help.rb file: > > irb(main):001:0> require 'rubygems' > => true > irb(main):002:0> require 'test_help' > => false > > According to the contract of require this would indicate that > "test_help" has already been loaded, which is true in a sense, but > the load failure is never exposed. > > Without RubyGems an exception is thrown on the first invocation of > require, but not the second: > > require File.join(File.dirname(__FILE__), "test_help") > LoadError: no such file to load -- b > from ./test_help.rb:1:in `require' > from ./test_help.rb:1 > from (irb):1 > irb(main):002:0> require File.join(File.dirname(__FILE__), > "test_help") > => false > > I hope this illustrates the issue that I am getting at. RubyGems > cannot know that the LoadError exception refers to the path of the > require, it can refer to a nested require. When the second > invocation of __require in RubyGems require method returns false, > should RubyGems maybe issue a warning? > > Thanks! > > Peter > > ---------------------------- > Peter Marklund > Garvar Lundins Gr?nd 7 > 11220 Stockholm > Sweden > > Mobile Phone: +46-(0)70-4164857 > Home Phone: +46-(0)8-50091315 > Skype: peter_marklund > > IM: AIM - petermarklund, MSN - peter_marklund at hotmail.com, Yahoo - > peter_marklund2002 > > http://marklunds.com > ---------------------------- > > > ---------------------------- Peter Marklund Garvar Lundins Gr?nd 7 11220 Stockholm Sweden Mobile Phone: +46-(0)70-4164857 Home Phone: +46-(0)8-50091315 Skype: peter_marklund IM: AIM - petermarklund, MSN - peter_marklund at hotmail.com, Yahoo - peter_marklund2002 http://marklunds.com ---------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20070320/d8624eac/attachment-0001.html From anatol.pomozov at gmail.com Tue Mar 20 17:43:30 2007 From: anatol.pomozov at gmail.com (Cerberus) Date: Wed, 21 Mar 2007 00:43:30 +0300 Subject: [Rubygems-developers] [rubygems] Build broken by chadfowler (#1221) Message-ID: <46005582b5e28_38815fd5381db@ubuntu.tmail> ------------------------------------------------------------------------ r1221 | chadfowler | 2007-03-17 20:45:45 +0300 | 2 lines Changed paths: M /trunk/ChangeLog M /trunk/lib/rubygems/installer.rb M /trunk/test/test_installer.rb rework path checking to use Pathname #8811 ara howard ------------------------------------------------------------------------ (in C:/Documents and Settings/anatol/.cerberus/work/rubygems/sources) Loaded suite C:/Program Files/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader Started ....................................................................................................................................................................................................................E.......E........................................................................... Finished in 42.891 seconds. 1) Error: test_index_signature(TestSourceIndex): ArgumentError: wrong number of arguments (1 for 0) ./lib/rubygems/source_index.rb:177:in `hexdigest' ./lib/rubygems/source_index.rb:177:in `index_signature' ./test/test_source_index.rb:174:in `test_index_signature' 2) Error: test_signature(TestSourceIndex): ArgumentError: wrong number of arguments (1 for 0) ./lib/rubygems/source_index.rb:182:in `hexdigest' ./lib/rubygems/source_index.rb:182:in `gem_signature' ./test/test_source_index.rb:162:in `test_signature' 296 tests, 1025 assertions, 0 failures, 2 errors C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:100: warning: already initialized constant Options C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:103: warning: redefine check_options C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:112: warning: redefine scan_open_optional_arguments C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:122: warning: redefine open_uri C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:148: warning: redefine open_loop C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:221: warning: redefine redirectable? C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:229: warning: redefine open_http C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:340: warning: method redefined; discarding old initialize C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:348: warning: method redefined; discarding old initialize C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:354: warning: already initialized constant StringMax C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:355: warning: method redefined; discarding old << C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:368: warning: method redefined; discarding old io C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:376: warning: redefine init C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:402: warning: method redefined; discarding old meta_add_field C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:407: warning: method redefined; discarding old last_modified C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:415: warning: already initialized constant RE_LWS C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:416: warning: already initialized constant RE_TOKEN C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:417: warning: already initialized constant RE_QUOTED_STRING C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:418: warning: already initialized constant RE_PARAMETERS C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:420: warning: method redefined; discarding old content_type_parse C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:440: warning: method redefined; discarding old content_type C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:455: warning: method redefined; discarding old charset C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:472: warning: method redefined; discarding old content_encoding C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:610: warning: method redefined; discarding old open C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:618: warning: method redefined; discarding old read C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:643: warning: method redefined; discarding old find_proxy C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:708: warning: method redefined; discarding old buffer_open C:/Program Files/ruby/lib/ruby/1.8/open-uri.rb:716: warning: method redefined; discarding old buffer_open rake aborted! Command failed with status (1): [C:/Program Files/ruby/bin/ruby -w -Ilib "C...] (See full trace by running task with --trace) -- Cerberus 0.3.4, http://cerberus.rubyforge.org/ From transfire at gmail.com Tue Mar 20 21:39:23 2007 From: transfire at gmail.com (TRANS) Date: Tue, 20 Mar 2007 21:39:23 -0400 Subject: [Rubygems-developers] gembundles Message-ID: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> Hi-- A few days back I brought up some ideas for dealing with multi-packages. This evening I sat down and put to together a little tool to handle just that: gembundle. The ideas is simple. Lets say I have a couple of gems: hello_world.gem and adios_world.gem. % gembundle build tryme hello_world-1.0.0.gem adios_world-1.0.0.gem This creates a tar.gz file called, tryme.gembundle which simply contains the two listed gems, Then... % gembundle install tryme.gembundle Successfully installed hello_world, version 1.0.0 Successfully installed adios_world, version 1.0.0 The intsall command just copies the bundle to a temp location, unpacks it and installs the contained gems (with the -y option). That's it. Of course, my script is just a quick prototype --I'm shelling out for all the tar and gem stuff. And it doesn't support some features like remote access for grabbing gems to bundle. But hopefully it doesn't matter b/c I wanted to see if others would approve of this functionality being incorporated into RubyGems itself. It's pretty straightforward. It would just mean adding a "bundle" command to the gem CLI and allowing the installer to recognize a bundle vs a regular gem,such that '.gem' could still be used instead '.gembundle'. So what is it good for? It gives large application developers breathing room to use vendor gems more freely. Per my explanation in my last post, installing a gem that has many dependencies can be off-putting. Not only does the administrator have to consider each dependency, but ensuring the right versions of each can be daunting as well. Gembundles take care these concerns. And since a bundle simply contains regular gems it works seamlessly with the current design. What do you think? Thanks, T. From public at bagotricks.com Tue Mar 20 22:58:13 2007 From: public at bagotricks.com (Thomas Palmer) Date: Tue, 20 Mar 2007 19:58:13 -0700 Subject: [Rubygems-developers] Multiplatform gems Message-ID: <46009F45.5090202@bagotricks.com> What's the right way to do gems for multiple platforms? Or just point me to existing documentation on this if it exists. I've seen some mention of Gem::Platform, but I'm not sure how it is used if at all. Specifically, I'm also interested in the support of JRuby as a platform. (Well, there's the possibility of JNI code to provide sub-platforms of JRuby, but usually just plain JRuby would be enough.) But even understanding how to make a gem (or two gems with the same name???) to support both Linux and Windows would give me a start on this. Even more specifically, I've implemented some of RMagick for JRuby (including some decent support for Gruff), but I have yet to figure out how to package it as a gem such that it "just works". (Not that RMagick itself necessarily just works, but once someone has an app configured for RMagick ("gem 'rmagick'; require 'RMagick'"), I'd like that app to work unchanged in JRuby. Further, Java itself has all the support it needs built in for most common RMagick functionality, so there's no need for additional setup such as needed for ImageMagick. So "gem install " should get the job done there, too.) Also, I can ask the JRuby folks, but I want to see what y'all have to say, too. Thanks for any advice. - Tom Palmer From transfire at gmail.com Wed Mar 21 16:04:35 2007 From: transfire at gmail.com (TRANS) Date: Wed, 21 Mar 2007 16:04:35 -0400 Subject: [Rubygems-developers] gembundles In-Reply-To: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> References: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> Message-ID: <4b6f054f0703211304k78b3e23cse1e4381bca5fa04b@mail.gmail.com> On 3/20/07, TRANS wrote: > Hi-- > > A few days back I brought up some ideas for dealing with > multi-packages. This evening I sat down and put to together a little > tool to handle just that: gembundle. > > The ideas is simple. Lets say I have a couple of gems: hello_world.gem > and adios_world.gem. > > % gembundle build tryme hello_world-1.0.0.gem adios_world-1.0.0.gem > > This creates a tar.gz file called, tryme.gembundle which simply > contains the two listed gems, Then... > > % gembundle install tryme.gembundle > Successfully installed hello_world, version 1.0.0 > Successfully installed adios_world, version 1.0.0 > > The intsall command just copies the bundle to a temp location, unpacks > it and installs the contained gems (with the -y option). > > That's it. > > Of course, my script is just a quick prototype --I'm shelling out for > all the tar and gem stuff. And it doesn't support some features like > remote access for grabbing gems to bundle. But hopefully it doesn't > matter b/c I wanted to see if others would approve of this > functionality being incorporated into RubyGems itself. It's pretty > straightforward. It would just mean adding a "bundle" command to the > gem CLI and allowing the installer to recognize a bundle vs a regular > gem,such that '.gem' could still be used instead '.gembundle'. > > So what is it good for? It gives large application developers > breathing room to use vendor gems more freely. Per my explanation in > my last post, installing a gem that has many dependencies can be > off-putting. Not only does the administrator have to consider each > dependency, but ensuring the right versions of each can be daunting as > well. Gembundles take care these concerns. And since a bundle simply > contains regular gems it works seamlessly with the current design. > > What do you think? No response? T. From drnicwilliams at gmail.com Wed Mar 21 16:32:42 2007 From: drnicwilliams at gmail.com (Nic Williams) Date: Wed, 21 Mar 2007 21:32:42 +0100 Subject: [Rubygems-developers] gembundles In-Reply-To: <4b6f054f0703211304k78b3e23cse1e4381bca5fa04b@mail.gmail.com> References: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> <4b6f054f0703211304k78b3e23cse1e4381bca5fa04b@mail.gmail.com> Message-ID: <44b555bb0703211332qcfd9e6cm2f17ba31aa43e11c@mail.gmail.com> I'll bite. One popular bundle people might relate to is to bundle the rails gems together, as a demonstration. BTW, does/will your solution work for gems with components that get compiled at installation time? Probably not a showstopper though,. Gembundle still seems a good idea. Nic On 3/21/07, TRANS wrote: > > On 3/20/07, TRANS wrote: > > Hi-- > > > > A few days back I brought up some ideas for dealing with > > multi-packages. This evening I sat down and put to together a little > > tool to handle just that: gembundle. > > > > The ideas is simple. Lets say I have a couple of gems: hello_world.gem > > and adios_world.gem. > > > > % gembundle build tryme hello_world-1.0.0.gem adios_world-1.0.0.gem > > > > This creates a tar.gz file called, tryme.gembundle which simply > > contains the two listed gems, Then... > > > > % gembundle install tryme.gembundle > > Successfully installed hello_world, version 1.0.0 > > Successfully installed adios_world, version 1.0.0 > > > > The intsall command just copies the bundle to a temp location, unpacks > > it and installs the contained gems (with the -y option). > > > > That's it. > > > > Of course, my script is just a quick prototype --I'm shelling out for > > all the tar and gem stuff. And it doesn't support some features like > > remote access for grabbing gems to bundle. But hopefully it doesn't > > matter b/c I wanted to see if others would approve of this > > functionality being incorporated into RubyGems itself. It's pretty > > straightforward. It would just mean adding a "bundle" command to the > > gem CLI and allowing the installer to recognize a bundle vs a regular > > gem,such that '.gem' could still be used instead '.gembundle'. > > > > So what is it good for? It gives large application developers > > breathing room to use vendor gems more freely. Per my explanation in > > my last post, installing a gem that has many dependencies can be > > off-putting. Not only does the administrator have to consider each > > dependency, but ensuring the right versions of each can be daunting as > > well. Gembundles take care these concerns. And since a bundle simply > > contains regular gems it works seamlessly with the current design. > > > > What do you think? > > No response? > > T. > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > -- Dr Nic Williams http://www.drnicwilliams.com - Ruby/Rails/Javascript/Web2.0 skype: nicwilliams (p) +61 7 3102 3237 (Finds me anywhere in the world, via Skype) (m) +46 737 533 525 (Swedish mobile) (f) +61 7 3305 7572 (sends fax to my email) Bj?rnsonsgatan 153, 16 844 Bromma, Sweden -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20070321/8bcd78fa/attachment.html From transfire at gmail.com Thu Mar 22 08:40:11 2007 From: transfire at gmail.com (TRANS) Date: Thu, 22 Mar 2007 08:40:11 -0400 Subject: [Rubygems-developers] gembundles In-Reply-To: <44b555bb0703211332qcfd9e6cm2f17ba31aa43e11c@mail.gmail.com> References: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> <4b6f054f0703211304k78b3e23cse1e4381bca5fa04b@mail.gmail.com> <44b555bb0703211332qcfd9e6cm2f17ba31aa43e11c@mail.gmail.com> Message-ID: <4b6f054f0703220540t495bffd9g12dad79b8bc0bd56@mail.gmail.com> On 3/21/07, Nic Williams wrote: > I'll bite. > > One popular bundle people might relate to is to bundle the rails gems > together, as a demonstration. > > BTW, does/will your solution work for gems with components that get compiled > at installation time? Probably not a showstopper though,. Gembundle still > seems a good idea. I don't see why not. It installs gems just like gems are currently installed, this just adds a layer for packaging packages --hence a literal multi-package. Thanks for the support. I hope others feel the same. I especially would like to know what the gem developers think, as I really need this functionality, like, yesterday :) T. From phurley at gmail.com Thu Mar 22 11:17:30 2007 From: phurley at gmail.com (Patrick Hurley) Date: Thu, 22 Mar 2007 11:17:30 -0400 Subject: [Rubygems-developers] gembundles In-Reply-To: <4b6f054f0703220540t495bffd9g12dad79b8bc0bd56@mail.gmail.com> References: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> <4b6f054f0703211304k78b3e23cse1e4381bca5fa04b@mail.gmail.com> <44b555bb0703211332qcfd9e6cm2f17ba31aa43e11c@mail.gmail.com> <4b6f054f0703220540t495bffd9g12dad79b8bc0bd56@mail.gmail.com> Message-ID: <554ac39c0703220817l51b8b85eld0f47de8e3fd0ae8@mail.gmail.com> On 3/22/07, TRANS wrote: > On 3/21/07, Nic Williams wrote: > > I'll bite. > > > > One popular bundle people might relate to is to bundle the rails gems > > together, as a demonstration. > > > > BTW, does/will your solution work for gems with components that get compiled > > at installation time? Probably not a showstopper though,. Gembundle still > > seems a good idea. > > I don't see why not. It installs gems just like gems are currently > installed, this just adds a layer for packaging packages --hence a > literal multi-package. But they are built on the target system correct? I am actually (when I can find spare minutes) working on a binary builder, that will take a built from source binary gem from one system and create a new binary gem for that architecture. It is not elegant (I package up intermediate object files and the like), but in general I believe it will work. This is to simplify the use of gems with extensions on production servers that do not generally have a C compiler or other build tools. pth From transfire at gmail.com Thu Mar 22 13:01:23 2007 From: transfire at gmail.com (TRANS) Date: Thu, 22 Mar 2007 13:01:23 -0400 Subject: [Rubygems-developers] gembundles In-Reply-To: <554ac39c0703220817l51b8b85eld0f47de8e3fd0ae8@mail.gmail.com> References: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> <4b6f054f0703211304k78b3e23cse1e4381bca5fa04b@mail.gmail.com> <44b555bb0703211332qcfd9e6cm2f17ba31aa43e11c@mail.gmail.com> <4b6f054f0703220540t495bffd9g12dad79b8bc0bd56@mail.gmail.com> <554ac39c0703220817l51b8b85eld0f47de8e3fd0ae8@mail.gmail.com> Message-ID: <4b6f054f0703221001q35a7d9efva0755b5be514234b@mail.gmail.com> On 3/22/07, Patrick Hurley wrote: > On 3/22/07, TRANS wrote: > > On 3/21/07, Nic Williams wrote: > > > I'll bite. > > > > > > One popular bundle people might relate to is to bundle the rails gems > > > together, as a demonstration. > > > > > > BTW, does/will your solution work for gems with components that get compiled > > > at installation time? Probably not a showstopper though,. Gembundle still > > > seems a good idea. > > > > I don't see why not. It installs gems just like gems are currently > > installed, this just adds a layer for packaging packages --hence a > > literal multi-package. > > But they are built on the target system correct? I am actually (when I > can find spare minutes) working on a binary builder, that will take a > built from source binary gem from one system and create a new binary > gem for that architecture. It is not elegant (I package up > intermediate object files and the like), but in general I believe it > will work. This is to simplify the use of gems with extensions on > production servers that do not generally have a C compiler or other > build tools. Since I don't write any c code I am not aware. Gems doesn't have a facility for compiling? I though t did. Well, however Gems works is how Gembundles would work too. It just adds an extra multiple-package delivery layer. T. From drbrain at segment7.net Fri Mar 23 02:16:44 2007 From: drbrain at segment7.net (Eric Hodel) Date: Thu, 22 Mar 2007 23:16:44 -0700 Subject: [Rubygems-developers] gembundles In-Reply-To: <554ac39c0703220817l51b8b85eld0f47de8e3fd0ae8@mail.gmail.com> References: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> <4b6f054f0703211304k78b3e23cse1e4381bca5fa04b@mail.gmail.com> <44b555bb0703211332qcfd9e6cm2f17ba31aa43e11c@mail.gmail.com> <4b6f054f0703220540t495bffd9g12dad79b8bc0bd56@mail.gmail.com> <554ac39c0703220817l51b8b85eld0f47de8e3fd0ae8@mail.gmail.com> Message-ID: <6E6BD5D5-0D7A-4DBB-A886-23FD6A151FCC@segment7.net> On Mar 22, 2007, at 08:17, Patrick Hurley wrote: > On 3/22/07, TRANS wrote: >> On 3/21/07, Nic Williams wrote: >>> I'll bite. >>> >>> One popular bundle people might relate to is to bundle the rails >>> gems >>> together, as a demonstration. >>> >>> BTW, does/will your solution work for gems with components that >>> get compiled >>> at installation time? Probably not a showstopper though,. >>> Gembundle still >>> seems a good idea. >> >> I don't see why not. It installs gems just like gems are currently >> installed, this just adds a layer for packaging packages --hence a >> literal multi-package. > > But they are built on the target system correct? I am actually (when I > can find spare minutes) working on a binary builder, that will take a > built from source binary gem from one system and create a new binary > gem for that architecture. It is not elegant (I package up > intermediate object files and the like), but in general I believe it > will work. This is to simplify the use of gems with extensions on > production servers that do not generally have a C compiler or other > build tools. RubyInline has this capability. From drbrain at segment7.net Fri Mar 23 02:19:02 2007 From: drbrain at segment7.net (Eric Hodel) Date: Thu, 22 Mar 2007 23:19:02 -0700 Subject: [Rubygems-developers] gembundles In-Reply-To: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> References: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> Message-ID: <58B2D226-75CD-4AA2-BF07-9695294DB4FA@segment7.net> On Mar 20, 2007, at 18:39, TRANS wrote: > A few days back I brought up some ideas for dealing with > multi-packages. This evening I sat down and put to together a little > tool to handle just that: gembundle. > > [...] > > Of course, my script is just a quick prototype --I'm shelling out for > all the tar and gem stuff. And it doesn't support some features like > remote access for grabbing gems to bundle. But hopefully it doesn't > matter b/c I wanted to see if others would approve of this > functionality being incorporated into RubyGems itself. It's pretty > straightforward. It would just mean adding a "bundle" command to the > gem CLI and allowing the installer to recognize a bundle vs a regular > gem,such that '.gem' could still be used instead '.gembundle'. > > So what is it good for? It gives large application developers > breathing room to use vendor gems more freely. Per my explanation in > my last post, installing a gem that has many dependencies can be > off-putting. Not only does the administrator have to consider each > dependency, but ensuring the right versions of each can be daunting as > well. Gembundles take care these concerns. And since a bundle simply > contains regular gems it works seamlessly with the current design. > > What do you think? Why not release it as a separate gem, let it develop for a while, and if people use it, it can be included in RubyGems at a future date? Bundling with RubyGems is going to reduce opportunities for rapid improvement. From transfire at gmail.com Fri Mar 23 04:30:55 2007 From: transfire at gmail.com (TRANS) Date: Fri, 23 Mar 2007 04:30:55 -0400 Subject: [Rubygems-developers] gembundles In-Reply-To: <58B2D226-75CD-4AA2-BF07-9695294DB4FA@segment7.net> References: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> <58B2D226-75CD-4AA2-BF07-9695294DB4FA@segment7.net> Message-ID: <4b6f054f0703230130w54cd3688ibf14879ba2148c7b@mail.gmail.com> On 3/23/07, Eric Hodel wrote: > Why not release it as a separate gem, let it develop for a while, and > if people use it, it can be included in RubyGems at a future date? > > Bundling with RubyGems is going to reduce opportunities for rapid > improvement. Okay. Well I can do that. It's pretty drop-dead simple though. Do you have any reason to suspect it's a bad idea? I'll go ahead and make it available, I'd want to use Gems built-in functions though. How would I use Gems lib to create a tarball? Thanks, T. From halostatue at gmail.com Fri Mar 23 10:11:35 2007 From: halostatue at gmail.com (Austin Ziegler) Date: Fri, 23 Mar 2007 10:11:35 -0400 Subject: [Rubygems-developers] gembundles In-Reply-To: <4b6f054f0703230130w54cd3688ibf14879ba2148c7b@mail.gmail.com> References: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> <58B2D226-75CD-4AA2-BF07-9695294DB4FA@segment7.net> <4b6f054f0703230130w54cd3688ibf14879ba2148c7b@mail.gmail.com> Message-ID: <9e7db9110703230711x86548a8n2ca2d00ba689cbd8@mail.gmail.com> On 3/23/07, TRANS wrote: > On 3/23/07, Eric Hodel wrote: > > Why not release it as a separate gem, let it develop for a while, and > > if people use it, it can be included in RubyGems at a future date? > > Bundling with RubyGems is going to reduce opportunities for rapid > > improvement. > Okay. Well I can do that. It's pretty drop-dead simple though. Do you > have any reason to suspect it's a bad idea? Yeah; it's shelling out for tar. Use Archive::Tar::Minitar instead and then you only depend on RubyGems and can script that appropriately (see Patrick's questions recently on automating Gems). -austin -- Austin Ziegler * halostatue at gmail.com * http://www.halostatue.ca/ * austin at halostatue.ca * http://www.halostatue.ca/feed/ * austin at zieglers.ca From mfp at acm.org Fri Mar 23 13:47:27 2007 From: mfp at acm.org (Mauricio Fernandez) Date: Fri, 23 Mar 2007 18:47:27 +0100 Subject: [Rubygems-developers] gembundles In-Reply-To: <9e7db9110703230711x86548a8n2ca2d00ba689cbd8@mail.gmail.com> References: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> <58B2D226-75CD-4AA2-BF07-9695294DB4FA@segment7.net> <4b6f054f0703230130w54cd3688ibf14879ba2148c7b@mail.gmail.com> <9e7db9110703230711x86548a8n2ca2d00ba689cbd8@mail.gmail.com> Message-ID: <20070323174727.GD7652@tux-chan> On Fri, Mar 23, 2007 at 10:11:35AM -0400, Austin Ziegler wrote: > On 3/23/07, TRANS wrote: > > On 3/23/07, Eric Hodel wrote: > > > Why not release it as a separate gem, let it develop for a while, and > > > if people use it, it can be included in RubyGems at a future date? > > > > Bundling with RubyGems is going to reduce opportunities for rapid > > > improvement. > > Okay. Well I can do that. It's pretty drop-dead simple though. Do you > > have any reason to suspect it's a bad idea? > > Yeah; it's shelling out for tar. Use Archive::Tar::Minitar instead and > then you only depend on RubyGems and can script that appropriately > (see Patrick's questions recently on automating Gems). If you don't want an extra dependency, you can as well use rubygems/package.rb; it's the code Archive::Tar::Minitar was derived from. AFAIK it has barely changed since it was written in 2004 (only signed packages and a workaround for a win32+zlib issue come to mind, but those didn't affect the basic tar read/write functionality), so if you use it your code is nearly guaranteed to work with all RubyGems setups out there. -- Mauricio Fernandez - http://eigenclass.org - singular Ruby ** Latest postings ** Rich exception hierarchies, multiple inheritance in Ruby http://eigenclass.org/hiki/exception-hierarchies Towards compatibility with Ruby 1.9: Rails, Rake, RubyGems... http://eigenclass.org/hiki/porting-rails-to-ruby-1.9 From drbrain at segment7.net Fri Mar 23 21:53:43 2007 From: drbrain at segment7.net (Eric Hodel) Date: Fri, 23 Mar 2007 18:53:43 -0700 Subject: [Rubygems-developers] gembundles In-Reply-To: <4b6f054f0703230130w54cd3688ibf14879ba2148c7b@mail.gmail.com> References: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> <58B2D226-75CD-4AA2-BF07-9695294DB4FA@segment7.net> <4b6f054f0703230130w54cd3688ibf14879ba2148c7b@mail.gmail.com> Message-ID: <72801A42-873F-44B6-A139-F13724F827BC@segment7.net> On Mar 23, 2007, at 01:30, TRANS wrote: > On 3/23/07, Eric Hodel wrote: >> Why not release it as a separate gem, let it develop for a while, and >> if people use it, it can be included in RubyGems at a future date? >> >> Bundling with RubyGems is going to reduce opportunities for rapid >> improvement. > > Okay. Well I can do that. It's pretty drop-dead simple though. Do you > have any reason to suspect it's a bad idea? Maintaining a new feature for 1% of gem authors isn't a good use of RubyGems developers' time. From drbrain at segment7.net Sat Mar 24 12:44:47 2007 From: drbrain at segment7.net (Eric Hodel) Date: Sat, 24 Mar 2007 09:44:47 -0700 Subject: [Rubygems-developers] Having dynamic libraries installed in the bin directory without having them put in ruby's search path? In-Reply-To: References: <2721B38B-30C3-4C19-9073-3E896EF04D1D@segment7.net> <6684D1A5-7CF0-445C-9057-AA765A25442E@segment7.net> <70CD56A3-906C-4806-AB8A-DE5BB07F0893@segment7.net> Message-ID: <3FB89EC6-F38E-4EBC-AF82-1431776BB0F0@segment7.net> On Mar 20, 2007, at 05:20, Olivier Boudry wrote: >> Also, how does ruby get away with having zlib.so in a directory >> that's not in ENV['PATH']? Can you use the same trick? > > zlib.so is in the ruby search path (for searching ruby modules) and > zlib1.dll is in the bin directory. At least when installed with the > One Click Installer. Sorry, I meant gdbm.so vs gdbm.dll. From transfire at gmail.com Sat Mar 24 12:49:05 2007 From: transfire at gmail.com (TRANS) Date: Sat, 24 Mar 2007 12:49:05 -0400 Subject: [Rubygems-developers] gembundles In-Reply-To: <72801A42-873F-44B6-A139-F13724F827BC@segment7.net> References: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> <58B2D226-75CD-4AA2-BF07-9695294DB4FA@segment7.net> <4b6f054f0703230130w54cd3688ibf14879ba2148c7b@mail.gmail.com> <72801A42-873F-44B6-A139-F13724F827BC@segment7.net> Message-ID: <4b6f054f0703240949i4a2ee206g36f0f7314f6f9901@mail.gmail.com> On 3/23/07, Eric Hodel wrote: > On Mar 23, 2007, at 01:30, TRANS wrote: > > On 3/23/07, Eric Hodel wrote: > >> Why not release it as a separate gem, let it develop for a while, and > >> if people use it, it can be included in RubyGems at a future date? > >> > >> Bundling with RubyGems is going to reduce opportunities for rapid > >> improvement. > > > > Okay. Well I can do that. It's pretty drop-dead simple though. Do you > > have any reason to suspect it's a bad idea? > > Maintaining a new feature for 1% of gem authors isn't a good use of > RubyGems developers' time. Heck a working prototype only took me 30 minutes. Someone familiar with Gems could probably use my code as a template and weave it into gems in another 30. But hey, I don't mind. I'm the one who's itching for it after all. So I can write it even if it takes me a day to figure out how it should interact with RubyGems. I'll just make it standalone for now, and you can consider it for inclusion later. Actually, it wouldn't be a big deal as just a standalone app except for one thing. Without being part of gems proper we couldn't use "gem install" to download and install a gembundle from rubyforge (or other gem store). T. From transfire at gmail.com Sat Mar 24 12:49:32 2007 From: transfire at gmail.com (TRANS) Date: Sat, 24 Mar 2007 12:49:32 -0400 Subject: [Rubygems-developers] gembundles In-Reply-To: <20070323174727.GD7652@tux-chan> References: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> <58B2D226-75CD-4AA2-BF07-9695294DB4FA@segment7.net> <4b6f054f0703230130w54cd3688ibf14879ba2148c7b@mail.gmail.com> <9e7db9110703230711x86548a8n2ca2d00ba689cbd8@mail.gmail.com> <20070323174727.GD7652@tux-chan> Message-ID: <4b6f054f0703240949i21a146e2r3dcbf919102b29fb@mail.gmail.com> On 3/23/07, Mauricio Fernandez wrote: > On Fri, Mar 23, 2007 at 10:11:35AM -0400, Austin Ziegler wrote: > > On 3/23/07, TRANS wrote: > > > On 3/23/07, Eric Hodel wrote: > > > > Why not release it as a separate gem, let it develop for a while, and > > > > if people use it, it can be included in RubyGems at a future date? > > > > > > Bundling with RubyGems is going to reduce opportunities for rapid > > > > improvement. > > > Okay. Well I can do that. It's pretty drop-dead simple though. Do you > > > have any reason to suspect it's a bad idea? > > > > Yeah; it's shelling out for tar. Use Archive::Tar::Minitar instead and > > then you only depend on RubyGems and can script that appropriately > > (see Patrick's questions recently on automating Gems). > > If you don't want an extra dependency, you can as well use > rubygems/package.rb; it's the code Archive::Tar::Minitar was derived from. > AFAIK it has barely changed since it was written in 2004 (only signed packages > and a workaround for a win32+zlib issue come to mind, but those didn't affect > the basic tar read/write functionality), so if you use it your code is nearly > guaranteed to work with all RubyGems setups out there. Cool I'll do that. Thanks. T. From olivier.boudry at gmail.com Sat Mar 24 18:49:00 2007 From: olivier.boudry at gmail.com (Olivier Boudry) Date: Sat, 24 Mar 2007 18:49:00 -0400 Subject: [Rubygems-developers] Having dynamic libraries installed in the bin directory without having them put in ruby's search path? In-Reply-To: <3FB89EC6-F38E-4EBC-AF82-1431776BB0F0@segment7.net> References: <2721B38B-30C3-4C19-9073-3E896EF04D1D@segment7.net> <6684D1A5-7CF0-445C-9057-AA765A25442E@segment7.net> <70CD56A3-906C-4806-AB8A-DE5BB07F0893@segment7.net> <3FB89EC6-F38E-4EBC-AF82-1431776BB0F0@segment7.net> Message-ID: Interesting example. My module loading problems occurs when I try to load sapnwrfc.rb with sapnwrfc.dll somewhere in the path. Maybe Ruby tries to load so and dll files first? Don't know what are the loading preferences? Olivier. On 3/24/07, Eric Hodel wrote: > On Mar 20, 2007, at 05:20, Olivier Boudry wrote: > > >> Also, how does ruby get away with having zlib.so in a directory > >> that's not in ENV['PATH']? Can you use the same trick? > > > > zlib.so is in the ruby search path (for searching ruby modules) and > > zlib1.dll is in the bin directory. At least when installed with the > > One Click Installer. > > Sorry, I meant gdbm.so vs gdbm.dll. > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > From transfire at gmail.com Sun Mar 25 15:31:08 2007 From: transfire at gmail.com (TRANS) Date: Sun, 25 Mar 2007 15:31:08 -0400 Subject: [Rubygems-developers] find_dependencies_not_cached Message-ID: <4b6f054f0703251231k7d3dfb81i533cefe09c9f9397@mail.gmail.com> In remote_installer.rb there is method: def find_dependencies_not_installed(dependencies) to_install = [] dependencies.each do |dependency| srcindex = Gem::SourceIndex.from_installed_gems matches = srcindex.find_name(dependency.name, dependency.requirement_list) to_install.push dependency if matches.empty? end to_install end In building my extension for bundles I need something like this, but it needs to be "find_dependencies_not_cached", ie. I need to know which gems are not stored in the cache based on name and version requirement (irregardless of installation status). Is there a way I can easily handle this? Thanks, T. From transfire at gmail.com Sun Mar 25 18:55:26 2007 From: transfire at gmail.com (TRANS) Date: Sun, 25 Mar 2007 18:55:26 -0400 Subject: [Rubygems-developers] gembundles In-Reply-To: <4b6f054f0703240949i21a146e2r3dcbf919102b29fb@mail.gmail.com> References: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> <58B2D226-75CD-4AA2-BF07-9695294DB4FA@segment7.net> <4b6f054f0703230130w54cd3688ibf14879ba2148c7b@mail.gmail.com> <9e7db9110703230711x86548a8n2ca2d00ba689cbd8@mail.gmail.com> <20070323174727.GD7652@tux-chan> <4b6f054f0703240949i21a146e2r3dcbf919102b29fb@mail.gmail.com> Message-ID: <4b6f054f0703251555t1436c082j58bea392f083dc43@mail.gmail.com> While working on a integrated gembundles implementation. I figured out a much better approach. Rather than have a separate gembundle format, the standard gem can just have a third part. Ex. in some.gem: metadata.gz data.tar.gz bundle/ other.gem ... The other gems are determined by the dependencies of the gemspec. That way one can create totally new gembundles, or create one out of a pre-existing gemspec just as easily. When installing, I think gems would only need to copy the bundled gems to the rubygems cache first then proceed normally. T. From jim.weirich at gmail.com Mon Mar 26 00:20:42 2007 From: jim.weirich at gmail.com (Jim Weirich) Date: Mon, 26 Mar 2007 00:20:42 -0400 Subject: [Rubygems-developers] [rubygems] Build broken by chadfowler (#1221) In-Reply-To: <46005582b5e28_38815fd5381db@ubuntu.tmail> References: <46005582b5e28_38815fd5381db@ubuntu.tmail> Message-ID: The source_index.rb file was changed to use hexdigest, but in doing so caused the following errors: > 1) Error: > test_index_signature(TestSourceIndex): > ArgumentError: wrong number of arguments (1 for 0) > ./lib/rubygems/source_index.rb:177:in `hexdigest' > ./lib/rubygems/source_index.rb:177:in `index_signature' > ./test/test_source_index.rb:174:in `test_index_signature' > > 2) Error: > test_signature(TestSourceIndex): > ArgumentError: wrong number of arguments (1 for 0) > ./lib/rubygems/source_index.rb:182:in `hexdigest' > ./lib/rubygems/source_index.rb:182:in `gem_signature' > ./test/test_source_index.rb:162:in `test_signature' The line in question is: Digest::SHA256.new.hexdigest(@gems[gem_full_name].to_yaml).to_s Is there any reason this shouldn't read: Digest::SHA256.new(@gems[gem_full_name].to_yaml).hexdigest ??? -- -- Jim Weirich jim at weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) From darix at web.de Mon Mar 26 06:31:47 2007 From: darix at web.de (Marcus Rueckert) Date: Mon, 26 Mar 2007 12:31:47 +0200 Subject: [Rubygems-developers] [rubygems] Build broken by chadfowler (#1221) In-Reply-To: References: <46005582b5e28_38815fd5381db@ubuntu.tmail> Message-ID: <20070326103147.GK22086@pixel.global-banlist.de> On 2007-03-26 00:20:42 -0400, Jim Weirich wrote: > The source_index.rb file was changed to use hexdigest, but in doing so > caused the following errors: > > > 1) Error: > > test_index_signature(TestSourceIndex): > > ArgumentError: wrong number of arguments (1 for 0) > > ./lib/rubygems/source_index.rb:177:in `hexdigest' > > ./lib/rubygems/source_index.rb:177:in `index_signature' > > ./test/test_source_index.rb:174:in `test_index_signature' > > > > 2) Error: > > test_signature(TestSourceIndex): > > ArgumentError: wrong number of arguments (1 for 0) > > ./lib/rubygems/source_index.rb:182:in `hexdigest' > > ./lib/rubygems/source_index.rb:182:in `gem_signature' > > ./test/test_source_index.rb:162:in `test_signature' > > The line in question is: > > Digest::SHA256.new.hexdigest(@gems[gem_full_name].to_yaml).to_s > > Is there any reason this shouldn't read: > > Digest::SHA256.new(@gems[gem_full_name].to_yaml).hexdigest wasnt this api changed in 1.8.6? darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org From jim.weirich at gmail.com Mon Mar 26 21:24:59 2007 From: jim.weirich at gmail.com (Jim Weirich) Date: Mon, 26 Mar 2007 21:24:59 -0400 Subject: [Rubygems-developers] [rubygems] Build broken by chadfowler (#1221) In-Reply-To: <20070326103147.GK22086@pixel.global-banlist.de> References: <46005582b5e28_38815fd5381db@ubuntu.tmail> <20070326103147.GK22086@pixel.global-banlist.de> Message-ID: On 3/26/07, Marcus Rueckert wrote: > On 2007-03-26 00:20:42 -0400, Jim Weirich wrote: > > The line in question is: > > > > Digest::SHA256.new.hexdigest(@gems[gem_full_name].to_yaml).to_s > > > > Is there any reason this shouldn't read: > > > > Digest::SHA256.new(@gems[gem_full_name].to_yaml).hexdigest > > wasnt this api changed in 1.8.6? Ahh, so it has. Thanks! -- -- -- Jim Weirich jim at weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) From chad at chadfowler.com Mon Mar 26 21:59:48 2007 From: chad at chadfowler.com (Chad Fowler) Date: Mon, 26 Mar 2007 21:59:48 -0400 Subject: [Rubygems-developers] [rubygems] Build broken by chadfowler (#1221) In-Reply-To: References: <46005582b5e28_38815fd5381db@ubuntu.tmail> <20070326103147.GK22086@pixel.global-banlist.de> Message-ID: On 3/26/07, Jim Weirich wrote: > On 3/26/07, Marcus Rueckert wrote: > > On 2007-03-26 00:20:42 -0400, Jim Weirich wrote: > > > The line in question is: > > > > > > Digest::SHA256.new.hexdigest(@gems[gem_full_name].to_yaml).to_s > > > > > > Is there any reason this shouldn't read: > > > > > > Digest::SHA256.new(@gems[gem_full_name].to_yaml).hexdigest > > > > wasnt this api changed in 1.8.6? > > Ahh, so it has. Thanks! > My mistake. I changed this on ruby 1.8.6. That raises the question....what do we want to do with such compatability changes? Perhaps we should rev trunk so it requires ruby 1.8.6? Chad From jim at weirichhouse.org Mon Mar 26 22:02:14 2007 From: jim at weirichhouse.org (Jim Weirich) Date: Mon, 26 Mar 2007 22:02:14 -0400 Subject: [Rubygems-developers] [rubygems] Build broken by chadfowler (#1221) In-Reply-To: References: <46005582b5e28_38815fd5381db@ubuntu.tmail> <20070326103147.GK22086@pixel.global-banlist.de> Message-ID: <46087B26.3090403@weirichhouse.org> Chad Fowler wrote: > My mistake. I changed this on ruby 1.8.6. That raises the > question....what do we want to do with such compatability changes? > Perhaps we should rev trunk so it requires ruby 1.8.6? No, this should be easy to work around. I'll have a fix in a bit. -- -- Jim Weirich jim at weirichhouse.org http://onestepback.org -- In theory, practice and theory are the same. -- In practice, they are different. From halostatue at gmail.com Tue Mar 27 14:08:33 2007 From: halostatue at gmail.com (Austin Ziegler) Date: Tue, 27 Mar 2007 14:08:33 -0400 Subject: [Rubygems-developers] gembundles In-Reply-To: <4b6f054f0703251555t1436c082j58bea392f083dc43@mail.gmail.com> References: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> <58B2D226-75CD-4AA2-BF07-9695294DB4FA@segment7.net> <4b6f054f0703230130w54cd3688ibf14879ba2148c7b@mail.gmail.com> <9e7db9110703230711x86548a8n2ca2d00ba689cbd8@mail.gmail.com> <20070323174727.GD7652@tux-chan> <4b6f054f0703240949i21a146e2r3dcbf919102b29fb@mail.gmail.com> <4b6f054f0703251555t1436c082j58bea392f083dc43@mail.gmail.com> Message-ID: <9e7db9110703271108w6061a59dwe2094c0ee6d0c75b@mail.gmail.com> On 3/25/07, TRANS wrote: > While working on a integrated gembundles implementation. I figured out > a much better approach. Rather than have a separate gembundle format, > the standard gem can just have a third part. Ex. in some.gem: I'm still really not sure what you're trying to solve here that isn't solved by normal gem dependencies. -austin -- Austin Ziegler * halostatue at gmail.com * http://www.halostatue.ca/ * austin at halostatue.ca * http://www.halostatue.ca/feed/ * austin at zieglers.ca From transfire at gmail.com Tue Mar 27 15:16:22 2007 From: transfire at gmail.com (TRANS) Date: Tue, 27 Mar 2007 15:16:22 -0400 Subject: [Rubygems-developers] gembundles In-Reply-To: <9e7db9110703271108w6061a59dwe2094c0ee6d0c75b@mail.gmail.com> References: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> <58B2D226-75CD-4AA2-BF07-9695294DB4FA@segment7.net> <4b6f054f0703230130w54cd3688ibf14879ba2148c7b@mail.gmail.com> <9e7db9110703230711x86548a8n2ca2d00ba689cbd8@mail.gmail.com> <20070323174727.GD7652@tux-chan> <4b6f054f0703240949i21a146e2r3dcbf919102b29fb@mail.gmail.com> <4b6f054f0703251555t1436c082j58bea392f083dc43@mail.gmail.com> <9e7db9110703271108w6061a59dwe2094c0ee6d0c75b@mail.gmail.com> Message-ID: <4b6f054f0703271216n3ab1cc5fl8828ac48ce58959c@mail.gmail.com> On 3/27/07, Austin Ziegler wrote: > On 3/25/07, TRANS wrote: > > While working on a integrated gembundles implementation. I figured out > > a much better approach. Rather than have a separate gembundle format, > > the standard gem can just have a third part. Ex. in some.gem: > > I'm still really not sure what you're trying to solve here that isn't > solved by normal gem dependencies. The general use case is when you have an application that depends on _many_ smaller packages. In my case, I am breaking Facets up into a number of subprojects so that programmers have the option to use parts of Facets independent of the whole. But Nitro uses Facets and Nitro doesn't want the situation where dozens fo subpackages have to be independently confirmed/downloaded/installed. They want ONE support package and that's it. So how do I acheive both goals? Moreover, it allows Nitro to to branch out to other libs, rather than depend on Facets for everything. Also, bundles makes it easier to distribute an application on physical media since everythng one needs can be in one package. Thridly, it puts us one step away from something like Klik or Jars for Ruby. T. From thewoolleyman at gmail.com Tue Mar 27 15:48:57 2007 From: thewoolleyman at gmail.com (Chad Woolley) Date: Tue, 27 Mar 2007 12:48:57 -0700 Subject: [Rubygems-developers] gembundles In-Reply-To: <4b6f054f0703271216n3ab1cc5fl8828ac48ce58959c@mail.gmail.com> References: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> <58B2D226-75CD-4AA2-BF07-9695294DB4FA@segment7.net> <4b6f054f0703230130w54cd3688ibf14879ba2148c7b@mail.gmail.com> <9e7db9110703230711x86548a8n2ca2d00ba689cbd8@mail.gmail.com> <20070323174727.GD7652@tux-chan> <4b6f054f0703240949i21a146e2r3dcbf919102b29fb@mail.gmail.com> <4b6f054f0703251555t1436c082j58bea392f083dc43@mail.gmail.com> <9e7db9110703271108w6061a59dwe2094c0ee6d0c75b@mail.gmail.com> <4b6f054f0703271216n3ab1cc5fl8828ac48ce58959c@mail.gmail.com> Message-ID: What about the potential duplication and conflict of versions? For example, if you multiple versions of a dependency installed as first-class gems, then other multiple (and possibly duplicated and conflicting) versions "bundled" in with another first-class gem, which ones "win"? What goes on the load path first? Does it depend on the circumstances (which one is loaded first)? On 3/27/07, TRANS wrote: > On 3/27/07, Austin Ziegler wrote: > > On 3/25/07, TRANS wrote: > > > While working on a integrated gembundles implementation. I figured out > > > a much better approach. Rather than have a separate gembundle format, > > > the standard gem can just have a third part. Ex. in some.gem: > > > > I'm still really not sure what you're trying to solve here that isn't > > solved by normal gem dependencies. > > The general use case is when you have an application that depends on > _many_ smaller packages. In my case, I am breaking Facets up into a > number of subprojects so that programmers have the option to use parts > of Facets independent of the whole. But Nitro uses Facets and Nitro > doesn't want the situation where dozens fo subpackages have to be > independently confirmed/downloaded/installed. They want ONE support > package and that's it. So how do I acheive both goals? Moreover, it > allows Nitro to to branch out to other libs, rather than depend on > Facets for everything. > > Also, bundles makes it easier to distribute an application on physical > media since everythng one needs can be in one package. > > Thridly, it puts us one step away from something like Klik or Jars for Ruby. > > T. > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > From halostatue at gmail.com Tue Mar 27 16:48:13 2007 From: halostatue at gmail.com (Austin Ziegler) Date: Tue, 27 Mar 2007 16:48:13 -0400 Subject: [Rubygems-developers] gembundles In-Reply-To: References: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> <58B2D226-75CD-4AA2-BF07-9695294DB4FA@segment7.net> <4b6f054f0703230130w54cd3688ibf14879ba2148c7b@mail.gmail.com> <9e7db9110703230711x86548a8n2ca2d00ba689cbd8@mail.gmail.com> <20070323174727.GD7652@tux-chan> <4b6f054f0703240949i21a146e2r3dcbf919102b29fb@mail.gmail.com> <4b6f054f0703251555t1436c082j58bea392f083dc43@mail.gmail.com> <9e7db9110703271108w6061a59dwe2094c0ee6d0c75b@mail.gmail.com> <4b6f054f0703271216n3ab1cc5fl8828ac48ce58959c@mail.gmail.com> Message-ID: <9e7db9110703271348y43401c34i95476269cfc7fcfc@mail.gmail.com> On 3/27/07, Chad Woolley wrote: > What about the potential duplication and conflict of versions? For > example, if you multiple versions of a dependency installed as > first-class gems, then other multiple (and possibly duplicated and > conflicting) versions "bundled" in with another first-class gem, which > ones "win"? What goes on the load path first? Does it depend on the > circumstances (which one is loaded first)? I'm not saying that I buy Trans's reasoning for the need for this -- I've long thought that Facets should be a lot more granular than it is and a lot of the things that Trans has tried to push on Ruby that I have thought ill-considered over the last two years has been because Facets is not granular at all. That said, my understanding of what Trans wants to do is to bundle a group of gems in a gembundle. That bundle would then silently install the bundled gems as normal. To put it a bit more concretely, let's use a simple example: * I decide to make a Text bundle (version 1.0) that contains Text::Format (1.1) and Text::Hyphen (1.0) and Text::Reform (0.9). * I have Text::Hyphen 2.0 installed already. The Text bundle will install Text::Format 1.1, Text::Hyphen 1.0, and Text::Reform 0.9 and not touch Text::Hyphen 2.0. Therefore, I will have Text::Hyphen (1.0, 2.0) in my gem list. The only problem I can see is the case where I already have Text::Hyphen 1.0 installed. The concern here is that, for all of the problems that Mauricio points out with the gem authority issues and the mirrors, a bundle would represent a more direct way of inserting malicious code in place of a previously known good version UNLESS the bundle installer refused to install a version that was currently installed. I'm still not sold on the concept, but the trick here isn't to add yet another place for Ruby to look for code, but for a bundled distribution environment. -austin -- Austin Ziegler * halostatue at gmail.com * http://www.halostatue.ca/ * austin at halostatue.ca * http://www.halostatue.ca/feed/ * austin at zieglers.ca From transfire at gmail.com Tue Mar 27 16:55:34 2007 From: transfire at gmail.com (TRANS) Date: Tue, 27 Mar 2007 16:55:34 -0400 Subject: [Rubygems-developers] gembundles In-Reply-To: References: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> <58B2D226-75CD-4AA2-BF07-9695294DB4FA@segment7.net> <4b6f054f0703230130w54cd3688ibf14879ba2148c7b@mail.gmail.com> <9e7db9110703230711x86548a8n2ca2d00ba689cbd8@mail.gmail.com> <20070323174727.GD7652@tux-chan> <4b6f054f0703240949i21a146e2r3dcbf919102b29fb@mail.gmail.com> <4b6f054f0703251555t1436c082j58bea392f083dc43@mail.gmail.com> <9e7db9110703271108w6061a59dwe2094c0ee6d0c75b@mail.gmail.com> <4b6f054f0703271216n3ab1cc5fl8828ac48ce58959c@mail.gmail.com> Message-ID: <4b6f054f0703271355m7fa1c300h916ef40b1ef421a@mail.gmail.com> On 3/27/07, Chad Woolley wrote: > What about the potential duplication and conflict of versions? For > example, if you multiple versions of a dependency installed as > first-class gems, then other multiple (and possibly duplicated and > conflicting) versions "bundled" in with another first-class gem, which > ones "win"? What goes on the load path first? Does it depend on the > circumstances (which one is loaded first)? Bundles don't change anything about versioning. Bundles simply include other gems with them. For example say a gembundle "foo" includes the gem bar-1.0.0, but you already have bar-1.0.1 installed. Doesn't matter, bar-1.0.0 will be installed and if foo, or some other gem in foo, uses gem 'bar', '=1.0.0' then 1.0.0 will be used. otherwsie 1.0.1 will be used. Which is exactly how gems works now irregardless of bundles. That's the key thing about bundles, they do nothing more than provide a way to distribute multiple gems in a single package. T. From transfire at gmail.com Tue Mar 27 17:53:49 2007 From: transfire at gmail.com (TRANS) Date: Tue, 27 Mar 2007 17:53:49 -0400 Subject: [Rubygems-developers] gembundles In-Reply-To: <9e7db9110703271348y43401c34i95476269cfc7fcfc@mail.gmail.com> References: <4b6f054f0703201839i2c407330s3f908ca60c8e08f2@mail.gmail.com> <4b6f054f0703230130w54cd3688ibf14879ba2148c7b@mail.gmail.com> <9e7db9110703230711x86548a8n2ca2d00ba689cbd8@mail.gmail.com> <20070323174727.GD7652@tux-chan> <4b6f054f0703240949i21a146e2r3dcbf919102b29fb@mail.gmail.com> <4b6f054f0703251555t1436c082j58bea392f083dc43@mail.gmail.com> <9e7db9110703271108w6061a59dwe2094c0ee6d0c75b@mail.gmail.com> <4b6f054f0703271216n3ab1cc5fl8828ac48ce58959c@mail.gmail.com> <9e7db9110703271348y43401c34i95476269cfc7fcfc@mail.gmail.com> Message-ID: <4b6f054f0703271453q1df9e68atd4c3a0c4f28cb3d0@mail.gmail.com> On 3/27/07, Austin Ziegler wrote: > On 3/27/07, Chad Woolley wrote: > > What about the potential duplication and conflict of versions? For > > example, if you multiple versions of a dependency installed as > > first-class gems, then other multiple (and possibly duplicated and > > conflicting) versions "bundled" in with another first-class gem, which > > ones "win"? What goes on the load path first? Does it depend on the > > circumstances (which one is loaded first)? > > I'm not saying that I buy Trans's reasoning for the need for this -- > I've long thought that Facets should be a lot more granular than it is > and a lot of the things that Trans has tried to push on Ruby that I > have thought ill-considered over the last two years has been because > Facets is not granular at all. "Push" is overstating it of course. I make suggestions like anyone else. And as far as I can recall there was only one suggestion with regards to Facets --escape sequences for require/load file paths, which I've already agreed with you was a bad idea. Was there something else? In anycase, I've come to agree with you about Facets. Threre's a core set of it which I think is good to be in a single package, but as Facets has grown some parts have made it too heavy. I've been wanting to do something about it for a while now. But I'm stuck without something like gembundles in order to properly support some of my end-users. > That said, my understanding of what Trans wants to do is to bundle a > group of gems in a gembundle. That bundle would then silently install > the bundled gems as normal. To put it a bit more concretely, let's use > a simple example: > > * I decide to make a Text bundle (version 1.0) that contains > Text::Format (1.1) and Text::Hyphen (1.0) and Text::Reform (0.9). > * I have Text::Hyphen 2.0 installed already. > > The Text bundle will install Text::Format 1.1, Text::Hyphen 1.0, and > Text::Reform 0.9 and not touch Text::Hyphen 2.0. Therefore, I will > have Text::Hyphen (1.0, 2.0) in my gem list. > > The only problem I can see is the case where I already have > Text::Hyphen 1.0 installed. The concern here is that, for all of the > problems that Mauricio points out with the gem authority issues and > the mirrors, a bundle would represent a more direct way of inserting > malicious code in place of a previously known good version UNLESS the > bundle installer refused to install a version that was currently > installed. That's a reasonable precaution. I mean, it's a minor issue since there's always a risk with installing software, but sure, it wouldn't hurt. Also, keep in mind that each bundled gem can be signed. > I'm still not sold on the concept, but the trick here isn't to add yet > another place for Ruby to look for code, but for a bundled > distribution environment. That's spot-on. T.