From drbrain at segment7.net Thu May 1 02:04:52 2008 From: drbrain at segment7.net (Eric Hodel) Date: Wed, 30 Apr 2008 23:04:52 -0700 Subject: [Rubygems-developers] Missing require from rubygems/remote_fetcher.rb "stringio" In-Reply-To: <3454c9680804300125t2674d02dl40a531d65365e57d@mail.gmail.com> References: <3454c9680804300051q6eb520dk9c07ff67e6d07cb9@mail.gmail.com> <3454c9680804300125t2674d02dl40a531d65365e57d@mail.gmail.com> Message-ID: On Apr 30, 2008, at 01:25 AM, Vladimir Sizikov wrote: > OK, some more info here. > > Ola Bini figured out why MRI works and JRuby fails in the first place. > It turned out that yaml library in MRI requires StringIO, while JRuby > didn't. This has been corrected so that JRuby is > "side-effect-compatible" with MRI in that regard, and yaml now also > require's StringIO. > > Still, adding explicit require 'stringio' to rubygems sources could be > useful, making the code more robust and less dependent on particular > implementation and side effects. Ok. Did somebody add the ticket to the RubyGems tracker? Otherwise it might get forgotten by the time I have some RubyGems cycles come up. From luislavena at gmail.com Thu May 1 02:18:06 2008 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 1 May 2008 03:18:06 -0300 Subject: [Rubygems-developers] Missing require from rubygems/remote_fetcher.rb "stringio" In-Reply-To: References: <3454c9680804300051q6eb520dk9c07ff67e6d07cb9@mail.gmail.com> <3454c9680804300125t2674d02dl40a531d65365e57d@mail.gmail.com> Message-ID: <71166b3b0804302318v7fe79aeq67926ec519ba5e56@mail.gmail.com> On Thu, May 1, 2008 at 3:04 AM, Eric Hodel wrote: > > > > Ok. Did somebody add the ticket to the RubyGems tracker? Otherwise it > might get forgotten by the time I have some RubyGems cycles come up. > It seems so: #19866: Rubygems fails with NameError: StringIO http://rubyforge.org/tracker/index.php?func=detail&aid=19866&group_id=126&atid=575 I'm also adding the uninstaller stuff too, just in case ;-) -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams From jeremydeininger at gmail.com Thu May 1 12:06:23 2008 From: jeremydeininger at gmail.com (Jeremy d) Date: Thu, 1 May 2008 09:06:23 -0700 Subject: [Rubygems-developers] multiple specific versions of dependencies Message-ID: Hello guys, I have an interesting use case for you, and I've been working to patch RubyGems in an attempt to match this functionality. User needs to install multiple specifically versioned gems in the quickest way possible. Example command line would be similar to this "gem install mongrel-1.0 daemons-1.0.8 rails rake-0.7.1". I've been working with the latest RubyGems to see if the patch would still fit and it is relying on having more caching available in order to hot-wire the dependency tree. I've ported it most of the way, but I have a failing test that specifies the installation of dependencies out of order. I've tracked it down to line 99 of dependency_installer.rb, previously the gems_and_sources contained a large list of specs, in which I could cherry-pick the right dependency. Now with the new caching, it only returns the latest version of a dependency. Is there a way I can still access a larger list of dependencies from the cache and select the specific version needed? I'm attaching the patch for 1.0.1 so you can see it in action. Also included is the patch in progress for 1.1.1, with 1 failing test. The patch adds an entirely new gem command called quickinstall, to retain original functionality as much as possible, while adding default options for speedup. To use it: gem quickinstall mongrel-1.0 daemons-1.0.8 Any advise on a better way to solve this use case for future versions of RubyGems would be much appreciated! -Jeremy RightScale.com -------------- next part -------------- A non-text attachment was scrubbed... Name: rubygems-quickinstall-patch.zip Type: application/zip Size: 11777 bytes Desc: not available URL: From scholz at scriptolutions.com Sat May 3 11:23:36 2008 From: scholz at scriptolutions.com (Lothar Scholz) Date: Sat, 3 May 2008 22:23:36 +0700 Subject: [Rubygems-developers] How do i get all available versions of a gem? Message-ID: <1664397337.20080503222336@scriptolutions.com> Hello, I upgraded from 0.9 and when i now use "gem list --remote --details" it seems that i don't get the complete list of available gem version. Only something like ruby-style (1.1.4) Supervised TCPServer, Yielding Listeners Easily where previous versions had an output like: ruby-style (1.1.4, 1.1.3, 1.1.2, 1.1.1) Supervised TCPServer, Yielding Listeners Easily Is there any way to get this version numbers back? They are very usefull in practice. -- Best regards, Lothar Scholz mailto:scholz at scriptolutions.com From thewoolleyman at gmail.com Sat May 3 13:07:23 2008 From: thewoolleyman at gmail.com (Chad Woolley) Date: Sat, 3 May 2008 10:07:23 -0700 Subject: [Rubygems-developers] How do i get all available versions of a gem? In-Reply-To: <1664397337.20080503222336@scriptolutions.com> References: <1664397337.20080503222336@scriptolutions.com> Message-ID: On Sat, May 3, 2008 at 8:23 AM, Lothar Scholz wrote: > I upgraded from 0.9 and when i now use "gem list --remote --details" it > seems that i don't get the complete list of available gem version. Use --all. There were caching performance improvements in 1.1.1, only the latest is retrieved by default now. -- Chad From ryand-ruby at zenspider.com Wed May 7 00:10:57 2008 From: ryand-ruby at zenspider.com (Ryan Davis) Date: Tue, 6 May 2008 21:10:57 -0700 Subject: [Rubygems-developers] developer dependencies Message-ID: I tasked John Barnette with getting developer dependencies implemented properly in rubygems a week or so ago... I'm happy to announce that we just committed his changes. Enjoy. From luislavena at gmail.com Wed May 7 01:08:52 2008 From: luislavena at gmail.com (Luis Lavena) Date: Wed, 7 May 2008 02:08:52 -0300 Subject: [Rubygems-developers] developer dependencies In-Reply-To: References: Message-ID: <71166b3b0805062208r75cc84b8g91864ec99c8d3dd5@mail.gmail.com> On Wed, May 7, 2008 at 1:10 AM, Ryan Davis wrote: > I tasked John Barnette with getting developer dependencies implemented > properly in rubygems a week or so ago... I'm happy to announce that we just > committed his changes. Enjoy. > just two things:yay and wow! Looking forward for the blog post describing how to abu... use this new functionality :-) -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams From djberg96 at gmail.com Sun May 11 13:18:37 2008 From: djberg96 at gmail.com (Daniel Berger) Date: Sun, 11 May 2008 11:18:37 -0600 Subject: [Rubygems-developers] The return of PLATFORM constants Message-ID: <6037b70c0805111018t4356388fn6299d9875b84d43d@mail.gmail.com> Hi, I have a few C extensions where I would like to be able to provide a way to specify a generic platform. For example, the sys-cpu source is the same for both FreeBSD and OS X. However, as things stand now I must create two separate gems - one for each platform. Here's where a Gem::Platform::BSD constant would be very handy. Or whatever you want to call it. I'm in a similar situation with gems that aren't particular to any version of a given platform or compiler. For example, the sys-cpu source for Solaris is the same for any version of Solaris, be it 2.6 or 2.10. Here's where a Gem::Platform::SOLARIS would be very handy. Is there any chance of adding these? If not, what are my options outside of building a gem on every platform? Thanks, Dan PS - I thought I brought this up before, but now I can't find the thread. From thewoolleyman at gmail.com Sun May 11 16:30:44 2008 From: thewoolleyman at gmail.com (Chad Woolley) Date: Sun, 11 May 2008 13:30:44 -0700 Subject: [Rubygems-developers] Mirror problem with Selenium 1.0.7? Message-ID: The Selenium (NOT selenium) gem doesn't seem to have the 1.0.7 version propogated to all mirrors for installation, but it is on the download page (http://rubyforge.org/frs/?group_id=2789). Where should this be reported/addressed? Thx, -- Chad From stephen.bannasch at deanbrook.org Mon May 12 13:04:54 2008 From: stephen.bannasch at deanbrook.org (Stephen Bannasch) Date: Mon, 12 May 2008 13:04:54 -0400 Subject: [Rubygems-developers] dependent gems not installed when using a --source gem repository Message-ID: I've got an alpha gem I am working on called make_models and I'm hosting it now on my own gem repository. Both main and arrayfields are gem dependencies of make_models. If I download it and install from a file the dependencies are resolved. I got this report from someone else who tried to install it from my gem repository without having the prerequisite gems: >sudo gem install make_models --source=http://rails.dev.concord.org/gems/ > >I get this error: > >(9:27:59) [tikal:/web/rails] pburney% sudo gem install make_models --source=http://rails.dev.concord.org/gems/ >Password: >Bulk updating Gem source index for: http://rails.dev.concord.org/gems/ >ERROR: Error installing make_models: > make_models requires main (>= 2.8.0) Has anybody else seen this problem? It could be something wrong with my gem since it's one of the first two gems I've made. From scholz at scriptolutions.com Tue May 13 10:44:58 2008 From: scholz at scriptolutions.com (Lothar Scholz) Date: Tue, 13 May 2008 21:44:58 +0700 Subject: [Rubygems-developers] Is there any update to the documentation Message-ID: <1679109981.20080513214458@scriptolutions.com> Hello, Seems that for a long time nobody touched http://rubygems.org/ As a third party tool vendor i have to say it's hard to keep up with the development when even the reference is not updated from time to time. Or did i miss some new location? -- Best regards, Lothar Scholz mailto:scholz at scriptolutions.com From scholz at scriptolutions.com Wed May 14 05:05:33 2008 From: scholz at scriptolutions.com (Lothar Scholz) Date: Wed, 14 May 2008 16:05:33 +0700 Subject: [Rubygems-developers] Why is ruby gems always updating when using "--source" ? Message-ID: <1118656429.20080514160533@scriptolutions.com> Hello, when i did something pretty easy like gem specification ackbar --remote --verbose --source "http://gems.rubyforge.org" Then i get an output: Missing metadata for 3153 gems Bulk updating Gem source index for: http://gems.rubyforge.org/ connection reset after 2 requests, retrying and have to wait a long long time, but without --source it does it immediately (well still slow but at least without any updates). -- Best regards, Lothar Scholz mailto:scholz at scriptolutions.com From luislavena at gmail.com Wed May 14 07:29:36 2008 From: luislavena at gmail.com (Luis Lavena) Date: Wed, 14 May 2008 08:29:36 -0300 Subject: [Rubygems-developers] Why is ruby gems always updating when using "--source" ? In-Reply-To: <1118656429.20080514160533@scriptolutions.com> References: <1118656429.20080514160533@scriptolutions.com> Message-ID: <71166b3b0805140429o1dd82401o3c89b4a1be3939fc@mail.gmail.com> On Wed, May 14, 2008 at 6:05 AM, Lothar Scholz wrote: > Hello, > > when i did something pretty easy like > gem specification ackbar --remote --verbose --source "http://gems.rubyforge.org" > gems.rubyforge.org is the default, first gem repository rubygems will use for the commands you indicate. > and have to wait a long long time, but without --source it does it > immediately (well still slow but at least without any updates). > When you explicitly indicates it, it skip the current local cache it have for it and try downloading again. HTH, -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams From scholz at scriptolutions.com Wed May 14 08:30:45 2008 From: scholz at scriptolutions.com (Lothar Scholz) Date: Wed, 14 May 2008 19:30:45 +0700 Subject: [Rubygems-developers] Why is ruby gems always updating when using "--source" ? In-Reply-To: <71166b3b0805140429o1dd82401o3c89b4a1be3939fc@mail.gmail.com> References: <1118656429.20080514160533@scriptolutions.com> <71166b3b0805140429o1dd82401o3c89b4a1be3939fc@mail.gmail.com> Message-ID: <1893598493.20080514193045@scriptolutions.com> Hello Luis, Wednesday, May 14, 2008, 6:29:36 PM, you wrote: LL> On Wed, May 14, 2008 at 6:05 AM, Lothar Scholz LL> wrote: >> Hello, >> >> when i did something pretty easy like >> gem specification ackbar --remote --verbose --source "http://gems.rubyforge.org" >> LL> gems.rubyforge.org is the default, first gem repository rubygems will LL> use for the commands you indicate. I know but it shouldn't matter. >> and have to wait a long long time, but without --source it does it >> immediately (well still slow but at least without any updates). >> LL> When you explicitly indicates it, it skip the current local cache it LL> have for it and try downloading again. First i do not understand why the local cache does not not have an indicator for the repository url (it should find out that source is just the same). I do not even understand what the purpose of this cache is when an explicit "--remote" is added. Second why does it want to update any kind of data when i just want to retrieve a remote spec. Sorry i think something is terrible broken here. In terms of performance rubygems sucks huge at the moment. With more then 3000 gems and 13000 versions we need a lot of improvements. -- Best regards, Lothar Scholz mailto:scholz at scriptolutions.com From luislavena at gmail.com Wed May 14 08:40:46 2008 From: luislavena at gmail.com (Luis Lavena) Date: Wed, 14 May 2008 09:40:46 -0300 Subject: [Rubygems-developers] Why is ruby gems always updating when using "--source" ? In-Reply-To: <1893598493.20080514193045@scriptolutions.com> References: <1118656429.20080514160533@scriptolutions.com> <71166b3b0805140429o1dd82401o3c89b4a1be3939fc@mail.gmail.com> <1893598493.20080514193045@scriptolutions.com> Message-ID: <71166b3b0805140540k352c88eaob83dbe33b56d3bf0@mail.gmail.com> On Wed, May 14, 2008 at 9:30 AM, Lothar Scholz wrote: > Hello Luis, > > Wednesday, May 14, 2008, 6:29:36 PM, you wrote: > > LL> On Wed, May 14, 2008 at 6:05 AM, Lothar Scholz > > LL> wrote: > >> Hello, > >> > >> when i did something pretty easy like > >> gem specification ackbar --remote --verbose --source "http://gems.rubyforge.org" > >> > > LL> gems.rubyforge.org is the default, first gem repository rubygems will > LL> use for the commands you indicate. > > I know but it shouldn't matter. > Don't get your point. > > > >> and have to wait a long long time, but without --source it does it > >> immediately (well still slow but at least without any updates). > >> > > LL> When you explicitly indicates it, it skip the current local cache it > LL> have for it and try downloading again. > > First i do not understand why the local cache does not not have an > indicator for the repository url (it should find out that source is > just the same). I do not even understand what the purpose of this > cache is when an explicit "--remote" is added. > > Second why does it want to update any kind of data when i just want to > retrieve a remote spec. > > Sorry i think something is terrible broken here. > > In terms of performance rubygems sucks huge at the moment. > With more then 3000 gems and 13000 versions we need a lot of > improvements. > Mmm, I hardly understand your point, issued the same command here and got ackbar spec results in 2 seconds... even with the bulk update... and on Windows. So maybe is kind of dumb to actually understand your point here, or maybe you didn't explain it better. -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams From scholz at scriptolutions.com Wed May 14 09:31:05 2008 From: scholz at scriptolutions.com (Lothar Scholz) Date: Wed, 14 May 2008 20:31:05 +0700 Subject: [Rubygems-developers] Why is ruby gems always updating when using "--source" ? In-Reply-To: <71166b3b0805140540k352c88eaob83dbe33b56d3bf0@mail.gmail.com> References: <1118656429.20080514160533@scriptolutions.com> <71166b3b0805140429o1dd82401o3c89b4a1be3939fc@mail.gmail.com> <1893598493.20080514193045@scriptolutions.com> <71166b3b0805140540k352c88eaob83dbe33b56d3bf0@mail.gmail.com> Message-ID: <1544830969.20080514203105@scriptolutions.com> Hello Luis, >> I know but it shouldn't matter. >> LL> Don't get your point. Well if http://gems.rubyforge.org is the default for --source the operation should be exactly the same if i use or leave the option. >> >> In terms of performance rubygems sucks huge at the moment. >> With more then 3000 gems and 13000 versions we need a lot of >> improvements. >> LL> Mmm, I hardly understand your point, issued the same command here and LL> got ackbar spec results in 2 seconds... even with the bulk update... LL> and on Windows. Okay how much data was transfered? I'm not interested in seconds i'm sure it is the data transfer size that kills the performance it. How much data is transfered? At the moment on my system everything seems to be impossible to install anything. Just because every simple command wants to update my fucking local cache, even when i don't see a technical reason why it needs to be updates. For example installing a gem where i give the exact version number. This should just do a http request download a gem file and unpack this in the correct places. Where does it need any information about other gems? So why is it trying to do a 10min bulk update? Mostly the connection is getting a time out anyway, so even waiting is impossible. And it tries to do this on every second or third operation? Even if i just did a remote listing (with --all --details) just before this operation (which should have send enough information for the rubygems client). Well when i think i really don't understand why we should have a local cache for ruby gems at. I don't see any real value. It just adds overload and complexity. So can you tell me what the purpose of the local cache is and keeping any information locally other the local downloaded gem archive files? -- Best regards, Lothar Scholz mailto:scholz at scriptolutions.com From hgs at dmu.ac.uk Wed May 14 10:07:32 2008 From: hgs at dmu.ac.uk (Hugh Sasse) Date: Wed, 14 May 2008 15:07:32 +0100 (WEST) Subject: [Rubygems-developers] Why is ruby gems always updating when using "--source" ? In-Reply-To: <1544830969.20080514203105@scriptolutions.com> References: <1118656429.20080514160533@scriptolutions.com> <71166b3b0805140429o1dd82401o3c89b4a1be3939fc@mail.gmail.com> <1893598493.20080514193045@scriptolutions.com> <71166b3b0805140540k352c88eaob83dbe33b56d3bf0@mail.gmail.com> <1544830969.20080514203105@scriptolutions.com> Message-ID: On Wed, 14 May 2008, Lothar Scholz wrote: > LL> Mmm, I hardly understand your point, issued the same command here and > LL> got ackbar spec results in 2 seconds... even with the bulk update... > LL> and on Windows. > > Okay how much data was transfered? > > I'm not interested in seconds i'm sure it is the data transfer size > that kills the performance it. How much data is transfered? There has been some improvement in this sort of thing over time. The indices weren't originally compressed, if I recall correctly. Now they are. I submitted patches to Ruby to get HTTP to use compression when the server supports it. I think there has been a certain amount of work done on using the differential features of HTTP to allow transmission of fragments that changed rather than the whole thing. I don't know how far that got. And Rubyforge does automatically make use of mirror sites as well, to try to spread the load So things are improving. > > At the moment on my system everything seems to be impossible to > install anything. > > Just because every simple command wants to update my fucking local cache, > even when i don't see a technical reason why it needs to be updates. > For example installing a gem where i give the exact version number. I've not looked at the source recently, and can't remember the details from when I did, but clearly when no version number is given, the index must be obtained, to check what the newest is. I suspect that exact version numbers make use of the same code (because of programmer effort). > This should just do a http request download a gem file and unpack this > in the correct places. Where does it need any information about other > gems? If the gem is on Rubyforge you can get it "by hand", and then install it. So you have a workaround for now. [...] There have been a lot of pressing issues with rubygems of late (different platform issues, what to do about case (in)?sensitive names, etc) so I just think "other wheels are getting the grease" at the moment. But I don't think the points you raise will go away, so they will be addressed in due course. Hugh From drbrain at segment7.net Thu May 15 03:25:14 2008 From: drbrain at segment7.net (Eric Hodel) Date: Thu, 15 May 2008 00:25:14 -0700 Subject: [Rubygems-developers] Is there any update to the documentation In-Reply-To: <1679109981.20080513214458@scriptolutions.com> References: <1679109981.20080513214458@scriptolutions.com> Message-ID: On May 13, 2008, at 07:44 AM, Lothar Scholz wrote: > Hello, > > Seems that for a long time nobody touched http://rubygems.org/ > > As a third party tool vendor i have to say it's hard to keep up with > the development when even the reference is not updated from time to > time. Or did i miss some new location? `gem server` From drbrain at segment7.net Thu May 15 03:34:20 2008 From: drbrain at segment7.net (Eric Hodel) Date: Thu, 15 May 2008 00:34:20 -0700 Subject: [Rubygems-developers] Why is ruby gems always updating when using "--source" ? In-Reply-To: <1893598493.20080514193045@scriptolutions.com> References: <1118656429.20080514160533@scriptolutions.com> <71166b3b0805140429o1dd82401o3c89b4a1be3939fc@mail.gmail.com> <1893598493.20080514193045@scriptolutions.com> Message-ID: <93FCB0D8-783A-4929-9F6D-366FC0AC4048@segment7.net> On May 14, 2008, at 05:30 AM, Lothar Scholz wrote: > Wednesday, May 14, 2008, 6:29:36 PM, you wrote: > LL> On Wed, May 14, 2008 at 6:05 AM, Lothar Scholz > LL> wrote: >>> and have to wait a long long time, but without --source it does it >>> immediately (well still slow but at least without any updates). > > LL> When you explicitly indicates it, it skip the current local > cache it > LL> have for it and try downloading again. > > First i do not understand why the local cache does not not have an > indicator for the repository url (it should find out that source is > just the same). I do not even understand what the purpose of this > cache is when an explicit "--remote" is added. > > Second why does it want to update any kind of data when i just want to > retrieve a remote spec. > > Sorry i think something is terrible broken here. > > In terms of performance rubygems sucks huge at the moment. > With more then 3000 gems and 13000 versions we need a lot of > improvements. The current metadata update system is a victim of RubyGems success. Please see trunk for work in progress towards an improved metadata update system. It is not yet wired in, however. From drbrain at segment7.net Thu May 15 03:37:12 2008 From: drbrain at segment7.net (Eric Hodel) Date: Thu, 15 May 2008 00:37:12 -0700 Subject: [Rubygems-developers] dependent gems not installed when using a --source gem repository In-Reply-To: References: Message-ID: <0F91F526-065D-4DB4-A1D1-963F843B110E@segment7.net> On May 12, 2008, at 10:04 AM, Stephen Bannasch wrote: > I've got an alpha gem I am working on called make_models and I'm > hosting it now on my own gem repository. Both main and arrayfields > are gem dependencies of make_models. If I download it and install > from a file the dependencies are resolved. > > I got this report from someone else who tried to install it from my > gem repository without having the prerequisite gems: > >> sudo gem install make_models --source=http://rails.dev.concord.org/gems/ >> >> I get this error: >> >> (9:27:59) [tikal:/web/rails] pburney% sudo gem install make_models >> --source=http://rails.dev.concord.org/gems/ >> Password: >> Bulk updating Gem source index for: > >http://rails.dev.concord.org/gems/ >> ERROR: Error installing make_models: >> make_models requires main (>= 2.8.0) > > Has anybody else seen this problem? There is no main gem in that gem repository. Either add main to that repository, or include both that repository and your repository as sources. From drbrain at segment7.net Thu May 15 03:45:43 2008 From: drbrain at segment7.net (Eric Hodel) Date: Thu, 15 May 2008 00:45:43 -0700 Subject: [Rubygems-developers] The return of PLATFORM constants In-Reply-To: <6037b70c0805111018t4356388fn6299d9875b84d43d@mail.gmail.com> References: <6037b70c0805111018t4356388fn6299d9875b84d43d@mail.gmail.com> Message-ID: On May 11, 2008, at 10:18 AM, Daniel Berger wrote: > I have a few C extensions where I would like to be able to provide a > way to specify a generic platform. > > For example, the sys-cpu source is the same for both FreeBSD and OS X. > However, as things stand now I must create two separate gems - one for > each platform. Here's where a Gem::Platform::BSD constant would be > very handy. Or whatever you want to call it. The same binary works on FreeBSD and OS X? Or is it a source-only gem? If it is a source-only gem, is there a way to handle this with extconf.rb instead? While OS X has FreeBSD roots, the two don't have completely compatible internals, so its hard to describe this in RubyGems. > I'm in a similar situation with gems that aren't particular to any > version of a given platform or compiler. For example, the sys-cpu > source for Solaris is the same for any version of Solaris, be it 2.6 > or 2.10. Here's where a Gem::Platform::SOLARIS would be very handy. > > Is there any chance of adding these? If not, what are my options > outside of building a gem on every platform? You should be able to hand-specify a platform with something like Gem::Platform.new 'x86-freebsd', but there seems to be a bug. Currently Gem::Platform is rather strict, as it is easier to make it more permissive in future releases than less permissive in future releases. From drbrain at segment7.net Thu May 15 03:47:43 2008 From: drbrain at segment7.net (Eric Hodel) Date: Thu, 15 May 2008 00:47:43 -0700 Subject: [Rubygems-developers] multiple specific versions of dependencies In-Reply-To: References: Message-ID: On May 1, 2008, at 09:06 AM, Jeremy d wrote: > Hello guys, > I have an interesting use case for you, and I've been working to patch > RubyGems in an attempt to match this functionality. > > User needs to install multiple specifically versioned gems in the > quickest way possible. Example command line would be similar to this > "gem install mongrel-1.0 daemons-1.0.8 rails rake-0.7.1". > > I've been working with the latest RubyGems to see if the patch would > still fit and it is relying on having more caching available in order > to hot-wire the dependency tree. I've ported it most of the way, but > I have a failing test that specifies the installation of dependencies > out of order. I've tracked it down to line 99 of > dependency_installer.rb, previously the gems_and_sources contained a > large list of specs, in which I could cherry-pick the right > dependency. Now with the new caching, it only returns the latest > version of a dependency. Is there a way I can still access a larger > list of dependencies from the cache and select the specific version > needed? Gem::SourceInfoCache.search takes an "all" paramater than is false by default. When you detect a version, you should make it switch to true. > I'm attaching the patch for 1.0.1 so you can see it in action. Also > included is the patch in progress for 1.1.1, with 1 failing test. The > patch adds an entirely new gem command called quickinstall, to retain > original functionality as much as possible, while adding default > options for speedup. To use it: gem quickinstall mongrel-1.0 > daemons-1.0.8 I'll take a look at it over the weekend. From drbrain at segment7.net Thu May 15 09:33:39 2008 From: drbrain at segment7.net (Eric Hodel) Date: Thu, 15 May 2008 06:33:39 -0700 Subject: [Rubygems-developers] env shebang always for JRuby In-Reply-To: <4815E1C9.7060403@sun.com> References: <4815E1C9.7060403@sun.com> Message-ID: On Apr 28, 2008, at 07:40 AM, Charles Oliver Nutter wrote: > JRuby ships with its "jruby" command as a shell script or batch file > under Windows. This means that the default behavior for JRuby > installing RubyGems is to always use an "env" shebang. However there > are two problems with this right now: > > - we have to manually patch our copy of RubyGems every time we > upgrade, to make sure it env-shebangs by default > - RubyGems hardcodes the env shebang string to "ruby" rather than > using the name of the current runtime's command (this may have been > fixed?) > > At any rate, I'm looking for suggestions or a RubyGems fix that will > save us having to manually patch this all the time. JRuby is not > going to have a native startup command any time soon, so the env > shebang is always going to be necessary. > > Thoughts? We discussed this on IM privately, and I forgot to copy it here. I'm planning on adding a file (or two) that RubyGems will look for and run to provide implementation-specific and distribution-specific defaults. This would allow jruby or apple or whomever to provide consistent behavior. From Daniel.Berger at qwest.com Thu May 15 10:23:24 2008 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Thu, 15 May 2008 09:23:24 -0500 Subject: [Rubygems-developers] The return of PLATFORM constants In-Reply-To: References: <6037b70c0805111018t4356388fn6299d9875b84d43d@mail.gmail.com> Message-ID: <7524A45A1A5B264FA4809E2156496CFB023D326D@ITOMAE2KM01.AD.QINTRA.COM> > -----Original Message----- > From: rubygems-developers-bounces at rubyforge.org > [mailto:rubygems-developers-bounces at rubyforge.org] On Behalf > Of Eric Hodel > Sent: Thursday, May 15, 2008 1:46 AM > To: rubygems-developers at rubyforge.org > Subject: Re: [Rubygems-developers] The return of PLATFORM constants > > On May 11, 2008, at 10:18 AM, Daniel Berger wrote: > > > I have a few C extensions where I would like to be able to > provide a > > way to specify a generic platform. > > > > For example, the sys-cpu source is the same for both > FreeBSD and OS X. > > However, as things stand now I must create two separate > gems - one for > > each platform. Here's where a Gem::Platform::BSD constant would be > > very handy. Or whatever you want to call it. > > The same binary works on FreeBSD and OS X? Or is it a > source-only gem? > > If it is a source-only gem, is there a way to handle this > with extconf.rb instead? While OS X has FreeBSD roots, the > two don't have completely compatible internals, so its hard > to describe this in RubyGems. That's what I do. But what do I set the Gem::PLATFORM to? I can't just use 'CURRENT', because FreeBSD won't pickup an OS X gem. I can't use 'RUBY' because there are other platforms, too. The only solution I've got so far is to either create separate gems, or just lump _all_ of the source files together and let extconf.rb sort it out. The latter approach works, but the downside to that approach is that I can't be specific about the rdoc files, so I end up a bunch of extra .c files (from other platforms) that get picked up during rdoc generation. > > I'm in a similar situation with gems that aren't particular to any > > version of a given platform or compiler. For example, the sys-cpu > > source for Solaris is the same for any version of Solaris, > be it 2.6 > > or 2.10. Here's where a Gem::Platform::SOLARIS would be very handy. > > > > Is there any chance of adding these? If not, what are my options > > outside of building a gem on every platform? > > You should be able to hand-specify a platform with something > like Gem::Platform.new 'x86-freebsd', but there seems to be a bug. I'll see what I can see. :) Thanks, 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 martin.krauskopf at gmail.com Fri May 16 03:31:58 2008 From: martin.krauskopf at gmail.com (Martin Krauskopf) Date: Fri, 16 May 2008 09:31:58 +0200 Subject: [Rubygems-developers] Is there any update to the documentation In-Reply-To: References: <1679109981.20080513214458@scriptolutions.com> Message-ID: Eric Hodel wrote: > On May 13, 2008, at 07:44 AM, Lothar Scholz wrote: > >> Hello, >> >> Seems that for a long time nobody touched http://rubygems.org/ >> >> As a third party tool vendor i have to say it's hard to keep up with >> the development when even the reference is not updated from time to >> time. Or did i miss some new location? > > `gem server` Hi Eric, likely you misread Lothar's question. He did not ask how to get documentation for installed gems. To Lothar: I have the similar problem. RubyGems sources and ChangeLog seems to be the best docs. m. From stephen.bannasch at deanbrook.org Fri May 16 13:00:10 2008 From: stephen.bannasch at deanbrook.org (Stephen Bannasch) Date: Fri, 16 May 2008 13:00:10 -0400 Subject: [Rubygems-developers] dependent gems not installed when using a --source gem repository In-Reply-To: <0F91F526-065D-4DB4-A1D1-963F843B110E@segment7.net> References: <0F91F526-065D-4DB4-A1D1-963F843B110E@segment7.net> Message-ID: At 12:37 AM -0700 5/15/08, Eric Hodel wrote: >On May 12, 2008, at 10:04 AM, Stephen Bannasch wrote: >>I've got an alpha gem I am working on called make_models and I'm hosting it now on my own gem repository. Both main and arrayfields are gem dependencies of make_models. If I download it and install from a file the dependencies are resolved. >> >>I got this report from someone else who tried to install it from my gem repository without having the prerequisite gems: >> >>>sudo gem install make_models --source=http://rails.dev.concord.org/gems/ >>> >>>I get this error: >>> >>>(9:27:59) [tikal:/web/rails] pburney% sudo gem install make_models --source=http://rails.dev.concord.org/gems/ >>>Password: >>>Bulk updating Gem source index for: http://rails.dev.concord.org/gems/ >>>ERROR: Error installing make_models: >>> make_models requires main (>= 2.8.0) >> >>Has anybody else seen this problem? > >There is no main gem in that gem repository. Either add main to that repository, or include both that repository and your repository as sources. I had assumed that the installed source repositories (default and any installed with gem sources --add) would be included in the search strategy used for dependency resolution. It wasn't immediately obvious how to to specify two or more gem repositories to use for resolving install dependencies without making them permanent. I looked at the code in local_remote_options.rb: Gem::LocalRemoteOptions#add_source_option # Add the --source option def add_source_option accept_uri_http add_option(:"Local/Remote", '--source URL', URI::HTTP, 'Use URL as the remote source for gems') do |value, options| if options[:added_source] then Gem.sources << value else options[:added_source] = true Gem.sources.replace [value] end end end OK ... now I understand ... Here's a doc diff that adds a bit more explanation about how it currently works: $ svn diff lib/rubygems/local_remote_options.rb Index: lib/rubygems/local_remote_options.rb =================================================================== --- lib/rubygems/local_remote_options.rb (revision 1715) +++ lib/rubygems/local_remote_options.rb (working copy) @@ -73,7 +73,8 @@ accept_uri_http add_option(:"Local/Remote", '--source URL', URI::HTTP, - 'Use URL as the remote source for gems') do |value, options| + 'Use URL as the remote source for gems instead of installed sources' + 'this option may be used multiple times to specify additional sources') do |value, options| if options[:added_source] then Gem.sources << value else ---------------------------------------------------------------------------------- And for anybody finding this later with Google here's a specific answer: I've already uninstalled my gem make_models. The gem arrayfields is a dependency for make_models but is not in my repository. I'm uninstalling it for this test. $ sudo gem uninstall arrayfields Now specifying both the default rubygems repository and my own repository (where make_models is hosted) installs the make_models gem from my custom repository and arrayfields from the rubygems repository. $ sudo gem install make_models --source=http://gems.rubyforge.org/ --source=http://rails.dev.concord.org/gems/ Updating metadata for 2 gems from http://rails.dev.concord.org/gems/ .. complete Successfully installed arrayfields-4.5.0 Successfully installed make_models-0.0.1.13254 2 gems installed Installing ri documentation for make_models-0.0.1.13254... Installing RDoc documentation for make_models-0.0.1.13254... From tim at kingtony.com.tw Fri May 16 21:14:18 2008 From: tim at kingtony.com.tw (=?BIG5?B?w7mnyqSk?=) Date: Sat, 17 May 2008 09:14:18 +0800 Subject: [Rubygems-developers] rubygems on UBUNTU server edition 8.04 is some troube Message-ID: <83357d8b0805161814y4729c3b4tf8a6ebbbe5d2e5cc@mail.gmail.com> Dear all: when I did as follows: timloo at ktshop:/usr/bin$ sudo gem1.8 install rails *It will holding on too long. * top - 09:08:19 up 4 days, 15:15, 4 users, load average: 7.59, 7.87, 6.19 Tasks: 64 total, 1 running, 60 sleeping, 3 stopped, 0 zombie Cpu(s): 0.1%us, 5.8%sy, 0.0%ni, 0.0%id, 93.7%wa, 0.1%hi, 0.3%si, 0.0%st Mem: 109392k total, 107472k used, 1920k free, 76k buffers Swap: 321260k total, 321260k used, 0k free, 924k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 20607 root 20 0 26584 21m 72 D 2.5 19.7 0:23.11 gem1.8 *and at the time, when pinging the server , It has failed .* *But When I gemed install rake, It is OK. * timloo at ktshop:/usr/bin$ sudo gem1.8 install rake [sudo] password for timloo: Updating metadata for 13 gems from http://gems.rubyforge.org/ ............. complete Successfully installed rake-0.8.1 1 gem installed Installing ri documentation for rake-0.8.1... Installing RDoc documentation for rake-0.8.1... Any Help?? Thanks Tim -- ??? ??????????? ??? ??->(04)23353567-643 ???->http://www.wretch.cc/blog/timloo (????????) MSN(GAIM)->timloo_7 at hotmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From drbrain at segment7.net Sat May 17 22:05:46 2008 From: drbrain at segment7.net (Eric Hodel) Date: Sat, 17 May 2008 19:05:46 -0700 Subject: [Rubygems-developers] Is there any update to the documentation In-Reply-To: References: <1679109981.20080513214458@scriptolutions.com> Message-ID: On May 16, 2008, at 00:31 AM, Martin Krauskopf wrote: > Eric Hodel wrote: >> On May 13, 2008, at 07:44 AM, Lothar Scholz wrote: >>> Hello, >>> >>> Seems that for a long time nobody touched http://rubygems.org/ >>> >>> As a third party tool vendor i have to say it's hard to keep up with >>> the development when even the reference is not updated from time to >>> time. Or did i miss some new location? >> `gem server` > > Hi Eric, > > likely you misread Lothar's question. I did not. > He did not ask how to get documentation for installed gems. http://localhost:8808/#rubygems From clifford.heath at gmail.com Wed May 21 20:55:23 2008 From: clifford.heath at gmail.com (Clifford Heath) Date: Thu, 22 May 2008 10:55:23 +1000 Subject: [Rubygems-developers] Binary gems or extension source - which and how? Message-ID: <3EF7463B-AF92-4074-9098-CE20FCC2E7CD@gmail.com> I've used newgem to build a gem that's a simple wrapper for the wbxml library, and I'm not sure how to publish it. My Manifest includes the ext files, including extconf.rb, but since newgem & hoe build the gemspec file on the fly, I haven't been able to work out how to arrange for the extension to be built on install. Can someone give me some pointers please? The reference is too detailed, I'm looking for a recipe if possible. Also, what support does gems provide for the naming procedure for binary files? If I want to publish platform-specific binary gems in addition to the source version, what's the procedure? Clifford Heath. From luislavena at gmail.com Wed May 21 21:09:23 2008 From: luislavena at gmail.com (Luis Lavena) Date: Wed, 21 May 2008 22:09:23 -0300 Subject: [Rubygems-developers] Binary gems or extension source - which and how? In-Reply-To: <3EF7463B-AF92-4074-9098-CE20FCC2E7CD@gmail.com> References: <3EF7463B-AF92-4074-9098-CE20FCC2E7CD@gmail.com> Message-ID: <71166b3b0805211809u2bf3eae4h4d7f5bf44629bcef@mail.gmail.com> On Wed, May 21, 2008 at 9:55 PM, Clifford Heath wrote: > I've used newgem to build a gem that's a simple wrapper for the wbxml > library, > and I'm not sure how to publish it. My Manifest includes the ext files, > including > extconf.rb, but since newgem & hoe build the gemspec file on the fly, I > haven't > been able to work out how to arrange for the extension to be built on > install. > > Can someone give me some pointers please? The reference is too detailed, > I'm looking for a recipe if possible. > You need to tweak somehow the spec Hoe generates inside the Hoe.new do...end block. AFAIK, right now Hoe is not able to handle normal C extensions, only inlined ones (the ones generated via RubyInline). I think Aslak Hellesoy published something related to this subject: http://blog.aslakhellesoy.com/2008/3/30/ruby-usb-gems > Also, what support does gems provide for the naming procedure for binary > files? If I want to publish platform-specific binary gems in addition to the > source > version, what's the procedure? rubygems itself append the platform specific to the end part of the filename it generates: mygem-1.1.1-i386-mingw32.gem HTH, -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams From clifford.heath at gmail.com Wed May 21 23:25:25 2008 From: clifford.heath at gmail.com (Clifford Heath) Date: Thu, 22 May 2008 13:25:25 +1000 Subject: [Rubygems-developers] Binary gems or extension source - which and how? In-Reply-To: <71166b3b0805211809u2bf3eae4h4d7f5bf44629bcef@mail.gmail.com> References: <3EF7463B-AF92-4074-9098-CE20FCC2E7CD@gmail.com> <71166b3b0805211809u2bf3eae4h4d7f5bf44629bcef@mail.gmail.com> Message-ID: <97E4C97A-2C0A-4988-8DA2-903DF9FCE1FA@gmail.com> Thanks Luis. I got the gem to build automatically, but the shared library load path doesn't seem to be set correctly. The require_paths in the gemspec is ["lib", "ext/wbxml"], but the .bundle built on MacOSX doesn't load when the .rb in the lib directory says "require 'wbxml.so'". Any idea what the story is here? If anyone wants to check it out, it's the wbxml project on RubyForge. You'll need libwbxml-dev (or port install wbxml2) to build it. The answer to getting the gem to build extensions on install was to modify the config/hoe.rb generated by "newgem", adding # Arrange to build the extension on install: $hoe.spec.extensions = ['ext/wbxml/extconf.rb'] Clifford Heath. On 22/05/2008, at 11:09 AM, Luis Lavena wrote: > On Wed, May 21, 2008 at 9:55 PM, Clifford Heath > wrote: >> I've used newgem to build a gem that's a simple wrapper for the wbxml >> library, >> and I'm not sure how to publish it. My Manifest includes the ext >> files, >> including >> extconf.rb, but since newgem & hoe build the gemspec file on the >> fly, I >> haven't >> been able to work out how to arrange for the extension to be built on >> install. >> >> Can someone give me some pointers please? The reference is too >> detailed, >> I'm looking for a recipe if possible. >> > > You need to tweak somehow the spec Hoe generates inside the Hoe.new > do...end block. > > AFAIK, right now Hoe is not able to handle normal C extensions, only > inlined ones (the ones generated via RubyInline). > > I think Aslak Hellesoy published something related to this subject: > > http://blog.aslakhellesoy.com/2008/3/30/ruby-usb-gems > >> Also, what support does gems provide for the naming procedure for >> binary >> files? If I want to publish platform-specific binary gems in >> addition to the >> source >> version, what's the procedure? > > rubygems itself append the platform specific to the end part of the > filename it generates: > > mygem-1.1.1-i386-mingw32.gem > > HTH, > -- > Luis Lavena > AREA 17 > - > Human beings, who are almost unique in having the ability to learn > from > the experience of others, are also remarkable for their apparent > disinclination to do so. > Douglas Adams > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers From clifford.heath at gmail.com Wed May 21 23:47:20 2008 From: clifford.heath at gmail.com (Clifford Heath) Date: Thu, 22 May 2008 13:47:20 +1000 Subject: [Rubygems-developers] Fixed: Re: Binary gems or extension source - which and how? In-Reply-To: <71166b3b0805211809u2bf3eae4h4d7f5bf44629bcef@mail.gmail.com> References: <3EF7463B-AF92-4074-9098-CE20FCC2E7CD@gmail.com> <71166b3b0805211809u2bf3eae4h4d7f5bf44629bcef@mail.gmail.com> Message-ID: <331C78CA-222B-4A1D-B389-4097E749B5B4@gmail.com> Re my previous problem: I had a file "lib/wbxml.rb", which contained require 'wbxml.so' and the shared library was under the ext directory (dirname was in required_paths), but the fact that the file basename of the file was the same prevented rubygems from loading it. The .rb contained nothing of interest, so I removed it and the problem has gone away. A trap for young players... thanks Luis for offering help. Clifford Heath. From luislavena at gmail.com Thu May 22 01:02:45 2008 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 22 May 2008 02:02:45 -0300 Subject: [Rubygems-developers] Binary gems or extension source - which and how? In-Reply-To: <97E4C97A-2C0A-4988-8DA2-903DF9FCE1FA@gmail.com> References: <3EF7463B-AF92-4074-9098-CE20FCC2E7CD@gmail.com> <71166b3b0805211809u2bf3eae4h4d7f5bf44629bcef@mail.gmail.com> <97E4C97A-2C0A-4988-8DA2-903DF9FCE1FA@gmail.com> Message-ID: <71166b3b0805212202r13d445d5he8ffab8653f4461d@mail.gmail.com> On Thu, May 22, 2008 at 12:25 AM, Clifford Heath wrote: > Thanks Luis. I got the gem to build automatically, but the > shared library load path doesn't seem to be set correctly. > The require_paths in the gemspec is ["lib", "ext/wbxml"], > but the .bundle built on MacOSX doesn't load when the > .rb in the lib directory says "require 'wbxml.so'". > > Any idea what the story is here? > What are you trying to do? you mention a bundle file, but then a require 'wbxml.so'? first of you need to remove extensions from your requires, that breaks compatibility since OSX uses 'bundle' and Linux/Windows uses 'so' as extensions for the shared objects. > If anyone wants to check it out, it's the wbxml project on > RubyForge. You'll need libwbxml-dev (or port install wbxml2) > to build it. > I've checked your Rakefile: http://wbxml.rubyforge.org/svn/Rakefile And you're assuming a lot about the extension (and the extension of it too). I suggest you take a look at DrNic post about newgem generators related to building C extensions: http://drnicwilliams.com/2008/04/01/writing-c-extensions-in-rubygems/ > The answer to getting the gem to build extensions on install > was to modify the config/hoe.rb generated by "newgem", adding > > # Arrange to build the extension on install: > $hoe.spec.extensions = ['ext/wbxml/extconf.rb'] > As I commented before, Hoe was not aimed to create gems that bundles extensions out of the box. Are you trying to build a native (pre-build) platform specific gem? or are you trying to include in your gem the C extension? -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams From luislavena at gmail.com Thu May 22 01:04:09 2008 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 22 May 2008 02:04:09 -0300 Subject: [Rubygems-developers] Fixed: Re: Binary gems or extension source - which and how? In-Reply-To: <331C78CA-222B-4A1D-B389-4097E749B5B4@gmail.com> References: <3EF7463B-AF92-4074-9098-CE20FCC2E7CD@gmail.com> <71166b3b0805211809u2bf3eae4h4d7f5bf44629bcef@mail.gmail.com> <331C78CA-222B-4A1D-B389-4097E749B5B4@gmail.com> Message-ID: <71166b3b0805212204s4ec5fe02l1eeb0af64613aa6@mail.gmail.com> On Thu, May 22, 2008 at 12:47 AM, Clifford Heath wrote: > Re my previous problem: I had a file "lib/wbxml.rb", which contained > > require 'wbxml.so' > > and the shared library was under the ext directory (dirname was in > required_paths), but the fact that the file basename of the file was > the same prevented rubygems from loading it. > > The .rb contained nothing of interest, so I removed it and the problem > has gone away. A trap for young players... thanks Luis for offering > help. > Great!, too bad I just sent a reply... I follow the FIFO workflow, so you already answered most of what I commented on that email ;-) Take care, -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams From clifford.heath at gmail.com Thu May 22 01:55:58 2008 From: clifford.heath at gmail.com (Clifford Heath) Date: Thu, 22 May 2008 15:55:58 +1000 Subject: [Rubygems-developers] Binary gems or extension source - which and how? In-Reply-To: <71166b3b0805212202r13d445d5he8ffab8653f4461d@mail.gmail.com> References: <3EF7463B-AF92-4074-9098-CE20FCC2E7CD@gmail.com> <71166b3b0805211809u2bf3eae4h4d7f5bf44629bcef@mail.gmail.com> <97E4C97A-2C0A-4988-8DA2-903DF9FCE1FA@gmail.com> <71166b3b0805212202r13d445d5he8ffab8653f4461d@mail.gmail.com> Message-ID: <674C89FF-8044-416D-9FE4-0542B90055EB@gmail.com> On 22/05/2008, at 3:02 PM, Luis Lavena wrote: > you mention a bundle file, but then a require 'wbxml.so'? Actually there's something in Rubygems that will load a bundle even if you require .so - I think it'll also load a DLL on windows if you ask for an so... just to make life easier. > first of you need to remove extensions from your requires, that breaks > compatibility since OSX uses 'bundle' and Linux/Windows uses 'so' as > extensions for the shared objects. I don't think so. Quite a few gems require *.so, and work cross- platform. Look at RMagick for example. > I suggest you take a look at DrNic post about newgem generators > related to building C extensions: > > http://drnicwilliams.com/2008/04/01/writing-c-extensions-in-rubygems/ Yes, did that yesterday, he doesn't answer the questions I asked. > Are you trying to build a native (pre-build) platform specific gem? I was... not now. It's what I did in the past with the one-wire gem too, especially since Windows users often don't have a C compiler. I still haven't learnt how to do that properly, but for now, it's not needed. Thanks, Clifford Heath. From drnicwilliams at gmail.com Thu May 22 04:22:23 2008 From: drnicwilliams at gmail.com (Nic Williams) Date: Thu, 22 May 2008 18:22:23 +1000 Subject: [Rubygems-developers] Binary gems or extension source - which and how? In-Reply-To: <674C89FF-8044-416D-9FE4-0542B90055EB@gmail.com> References: <3EF7463B-AF92-4074-9098-CE20FCC2E7CD@gmail.com> <71166b3b0805211809u2bf3eae4h4d7f5bf44629bcef@mail.gmail.com> <97E4C97A-2C0A-4988-8DA2-903DF9FCE1FA@gmail.com> <71166b3b0805212202r13d445d5he8ffab8653f4461d@mail.gmail.com> <674C89FF-8044-416D-9FE4-0542B90055EB@gmail.com> Message-ID: <44b555bb0805220122g624e227drc4f35da701eb6962@mail.gmail.com> If there are any lessons to be learned, and things to be added to the newgem generator I'd love to have them. The original generator for extensions was an encapsulation of what I had learned at Euruko so it might not be all encompassing. Another option is to replace the Hoe block with Echoe (see echoe gem). I think it has more support for extensions, but again I don't know what that extra support is :) Nic On Thu, May 22, 2008 at 3:55 PM, Clifford Heath wrote: > On 22/05/2008, at 3:02 PM, Luis Lavena wrote: > >> you mention a bundle file, but then a require 'wbxml.so'? >> > > Actually there's something in Rubygems that will load a bundle > even if you require .so - I think it'll also load a DLL on windows > if you ask for an so... just to make life easier. > > first of you need to remove extensions from your requires, that breaks >> compatibility since OSX uses 'bundle' and Linux/Windows uses 'so' as >> extensions for the shared objects. >> > > I don't think so. Quite a few gems require *.so, and work cross-platform. > Look at RMagick for example. > > I suggest you take a look at DrNic post about newgem generators >> related to building C extensions: >> >> http://drnicwilliams.com/2008/04/01/writing-c-extensions-in-rubygems/ >> > > Yes, did that yesterday, he doesn't answer the questions I asked. > > Are you trying to build a native (pre-build) platform specific gem? >> > > I was... not now. It's what I did in the past with the one-wire gem too, > especially since Windows users often don't have a C compiler. I still > haven't learnt how to do that properly, but for now, it's not needed. > > Thanks, > > Clifford Heath. > > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > -- Dr Nic Williams * Learn TextMate for Rails2 - http://peepcode.com/products/textmate-for-rails-2 * Training in Ruby/Rails/JavaScript - http://drnicacademy.com Fun with Ruby/Rails/Javascript - http://drnicwilliams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From luislavena at gmail.com Thu May 22 04:37:57 2008 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 22 May 2008 05:37:57 -0300 Subject: [Rubygems-developers] Binary gems or extension source - which and how? In-Reply-To: <44b555bb0805220122g624e227drc4f35da701eb6962@mail.gmail.com> References: <3EF7463B-AF92-4074-9098-CE20FCC2E7CD@gmail.com> <71166b3b0805211809u2bf3eae4h4d7f5bf44629bcef@mail.gmail.com> <97E4C97A-2C0A-4988-8DA2-903DF9FCE1FA@gmail.com> <71166b3b0805212202r13d445d5he8ffab8653f4461d@mail.gmail.com> <674C89FF-8044-416D-9FE4-0542B90055EB@gmail.com> <44b555bb0805220122g624e227drc4f35da701eb6962@mail.gmail.com> Message-ID: <71166b3b0805220137o421d4e85he6a9eda2ec25e3f2@mail.gmail.com> On Thu, May 22, 2008 at 5:22 AM, Nic Williams wrote: > If there are any lessons to be learned, and things to be added to the newgem > generator I'd love to have them. The original generator for extensions was > an encapsulation of what I had learned at Euruko so it might not be all > encompassing. I think there is no solution to fit all the scenarios. (One tool to rule them all?). Some developers want 1 extension into their gems (ext/), sometimes other put another nested level (ext/my_ext), there are others that have more than 1 extension (ext/{foo,bar}) so can be difficult to fit all these scenarios out of the box. > Another option is to replace the Hoe block with Echoe (see echoe gem). I > think it has more support for extensions, but again I don't know what that > extra support is :) Evan added good support to it, mostly extracted of our interaction with Mongrel gem. You will also get stuff like: Platform.make, Platform.windows?, Platform.gcc? or Platform.msvc? These handy definitions can let you: exclude or include dependencies or task in your Rakefile based on GCC, windows or microsoft compilers (also java?) Regards, -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams From jftucker at gmail.com Thu May 22 05:06:30 2008 From: jftucker at gmail.com (James Tucker) Date: Thu, 22 May 2008 10:06:30 +0100 Subject: [Rubygems-developers] Binary gems or extension source - which and how? In-Reply-To: <71166b3b0805220137o421d4e85he6a9eda2ec25e3f2@mail.gmail.com> References: <3EF7463B-AF92-4074-9098-CE20FCC2E7CD@gmail.com> <71166b3b0805211809u2bf3eae4h4d7f5bf44629bcef@mail.gmail.com> <97E4C97A-2C0A-4988-8DA2-903DF9FCE1FA@gmail.com> <71166b3b0805212202r13d445d5he8ffab8653f4461d@mail.gmail.com> <674C89FF-8044-416D-9FE4-0542B90055EB@gmail.com> <44b555bb0805220122g624e227drc4f35da701eb6962@mail.gmail.com> <71166b3b0805220137o421d4e85he6a9eda2ec25e3f2@mail.gmail.com> Message-ID: <29F22984-2A5F-4B04-9948-6EAB48791FD3@gmail.com> On 22 May 2008, at 09:37, Luis Lavena wrote: > On Thu, May 22, 2008 at 5:22 AM, Nic Williams > wrote: >> If there are any lessons to be learned, and things to be added to >> the newgem >> generator I'd love to have them. The original generator for >> extensions was >> an encapsulation of what I had learned at Euruko so it might not be >> all >> encompassing. > > I think there is no solution to fit all the scenarios. (One tool to > rule them all?). I use this one for situations where there is no pre-built binary gem. It's really designed to run on our local gem server (which includes a windows build environment), and then it packs up any gems that change: http://gem-repackager.rubyforge.org/svn/lib/gem_repackager.rb It probably needs more work, and requires root on most *nix systems. It'll also need some tweaks to work with rubyinline, which I've yet to complete (thus the lack of release). Anyway, have fun. From clifford.heath at gmail.com Thu May 22 05:24:17 2008 From: clifford.heath at gmail.com (Clifford Heath) Date: Thu, 22 May 2008 19:24:17 +1000 Subject: [Rubygems-developers] Binary gems or extension source - which and how? In-Reply-To: <44b555bb0805220122g624e227drc4f35da701eb6962@mail.gmail.com> References: <3EF7463B-AF92-4074-9098-CE20FCC2E7CD@gmail.com> <71166b3b0805211809u2bf3eae4h4d7f5bf44629bcef@mail.gmail.com> <97E4C97A-2C0A-4988-8DA2-903DF9FCE1FA@gmail.com> <71166b3b0805212202r13d445d5he8ffab8653f4461d@mail.gmail.com> <674C89FF-8044-416D-9FE4-0542B90055EB@gmail.com> <44b555bb0805220122g624e227drc4f35da701eb6962@mail.gmail.com> Message-ID: On 22/05/2008, at 6:22 PM, Nic Williams wrote: > If there are any lessons to be learned, and things to be added to > the newgem generator I'd love to have them. Ahh, Hi Nic - congrats on becoming a Dad (again?)! There were two things that tricked me: If your extension has the name as the gem, and you have a lib/ .rb file that's supposed to load it, it doesn't (at least on Leopard). You need to give the extension and the .rb file different basenames. Perhaps on LInux it's ok because the shared library has a libXYZ.so name, I don't know. The other thing, and perhaps this could go into the extconf_generator, is that you need to add something like this to your config/hoe.rake: # Arrange to build the extension on install: $hoe.spec.extensions = ['ext/wbxml/extconf.rb'] where wbxml is a wildcard for your extensions. Otherwise hoe won't build them when the gem gets installed. Thanks for newgem BTW, it has saved me time several times now. This is the first time I've used it with a gem having a C extension. In the area of documentation, I used pure rubyforge for source and publishing because I wasn't sure about how integrated the publishing is with source on github and the releases going to rubyforge. If it's all fine and "just works" something should say so. Some more clues or recipes on how to generate a source gem for most platforms, and a (say) Windows gem for deployment there (where folk often don't have a compiler installed) would be good too. Clifford Heath. From ryand-ruby at zenspider.com Thu May 22 17:21:10 2008 From: ryand-ruby at zenspider.com (Ryan Davis) Date: Thu, 22 May 2008 14:21:10 -0700 Subject: [Rubygems-developers] Binary gems or extension source - which and how? In-Reply-To: <71166b3b0805211809u2bf3eae4h4d7f5bf44629bcef@mail.gmail.com> References: <3EF7463B-AF92-4074-9098-CE20FCC2E7CD@gmail.com> <71166b3b0805211809u2bf3eae4h4d7f5bf44629bcef@mail.gmail.com> Message-ID: On May 21, 2008, at 18:09 , Luis Lavena wrote: > You need to tweak somehow the spec Hoe generates inside the Hoe.new > do...end block. > > AFAIK, right now Hoe is not able to handle normal C extensions, only > inlined ones (the ones generated via RubyInline). not true: # -*- ruby -*- require 'rubygems' require 'hoe' EXT = "ext/blah.#{Hoe::DLEXT}" class Blah VERSION = '1.0.0' end Hoe.new('blah', Blah::VERSION) do |p| p.developer('FIX', 'FIX at example.com') p.spec_extras[:extensions] = "ext/extconf.rb" p.clean_globs << EXT << "ext/*.o" << "ext/Makefile" end task :test => EXT file EXT => ["ext/extconf.rb", "ext/blah.c"] do Dir.chdir "ext" do ruby "extconf.rb" sh "make" end end # vim: syntax=Ruby From luislavena at gmail.com Thu May 22 18:23:24 2008 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 22 May 2008 19:23:24 -0300 Subject: [Rubygems-developers] Binary gems or extension source - which and how? In-Reply-To: References: <3EF7463B-AF92-4074-9098-CE20FCC2E7CD@gmail.com> <71166b3b0805211809u2bf3eae4h4d7f5bf44629bcef@mail.gmail.com> Message-ID: <71166b3b0805221523o57c86ba7jf4ab8c8bda5e04b5@mail.gmail.com> On Thu, May 22, 2008 at 6:21 PM, Ryan Davis wrote: > > On May 21, 2008, at 18:09 , Luis Lavena wrote: > >> You need to tweak somehow the spec Hoe generates inside the Hoe.new >> do...end block. >> >> AFAIK, right now Hoe is not able to handle normal C extensions, only >> inlined ones (the ones generated via RubyInline). > > > not true: > > # -*- ruby -*- > > [snip] I should said "as far memory remember the last time I looked at the code" :-P I personally don't use Hoe and the last time I checked it only dealed with Inlined extensions in pre-compiled form (was me who added it). :-D -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams From charles.nutter at sun.com Mon May 26 22:48:07 2008 From: charles.nutter at sun.com (Charles Oliver Nutter) Date: Mon, 26 May 2008 21:48:07 -0500 Subject: [Rubygems-developers] A couple patches to help JRuby Message-ID: <483B7667.3040802@sun.com> FYI, there's a couple bugs with patches that hopefully can get into the next maintenance release. We've modified them locally, but we'd like to avoid the juggling act we have to do when upgrading: [#19866] Rubygems fails with NameError: StringIO http://rubyforge.org/tracker/index.php?func=detail&aid=19866&group_id=126&atid=575 This one occurs because under MRI, YAML pulls in StringIO. Under JRuby, it does not, since we have our own YAML implementation. Other implementations may or may not have the same problem, so adding an explicit require 'stringio' seems like a good idea. [#20379] RubyGems only looks at platform for win_platform? method, and so doesn't install .bat files under JRuby http://rubyforge.org/tracker/index.php?func=detail&aid=20379&group_id=126&atid=575 JRuby's platform is always "java", but we have the correct OS name in rbconfig's "host_os" property. So this fix just adds a second check to the win_platform? method, allowing .bat files to install correctly with JRuby on Windows. Any objections to including in the next maintenance release? - Charlie From charles.nutter at sun.com Mon May 26 23:03:07 2008 From: charles.nutter at sun.com (Charles Oliver Nutter) Date: Mon, 26 May 2008 22:03:07 -0500 Subject: [Rubygems-developers] A couple patches to help JRuby In-Reply-To: <483B7667.3040802@sun.com> References: <483B7667.3040802@sun.com> Message-ID: <483B79EB.2060903@sun.com> Charles Oliver Nutter wrote: > FYI, there's a couple bugs with patches that hopefully can get into the > next maintenance release. We've modified them locally, but we'd like to > avoid the juggling act we have to do when upgrading: Here's another: [#20380] RubyGems installs using wrong executable name in JRuby under Windows http://rubyforge.org/tracker/index.php?func=detail&aid=20380&group_id=126&atid=575 In this case, because RubyGems always sticks EXEEXT on the end of RUBY_INSTALL_NAME, we end up with an executable named jruby.bat.exe, which of course doesn't run. I don't have a good patch for this one, so I'm looking for suggestions. Either RubyGems needs to not append when RUBY_INSTALL_NAME has the full executable name, or JRuby needs to instead report just "jruby" as RUBY_INSTALL_NAME" and then "bat" as EXEEXT. However the latter seems a little weird, especially if other code is expecting EXEEXT to be "exe". Thoughts? - Charlie From drbrain at segment7.net Tue May 27 14:59:30 2008 From: drbrain at segment7.net (Eric Hodel) Date: Tue, 27 May 2008 11:59:30 -0700 Subject: [Rubygems-developers] A couple patches to help JRuby In-Reply-To: <483B7667.3040802@sun.com> References: <483B7667.3040802@sun.com> Message-ID: <64C1EBEF-0ED2-4D7C-A6A8-634B57C511B5@segment7.net> On May 26, 2008, at 19:48 PM, Charles Oliver Nutter wrote: > FYI, there's a couple bugs with patches that hopefully can get into > the next maintenance release. We've modified them locally, but we'd > like to avoid the juggling act we have to do when upgrading: > > [#19866] Rubygems fails with NameError: StringIO > http://rubyforge.org/tracker/index.php?func=detail&aid=19866&group_id=126&atid=575 > > [#20379] RubyGems only looks at platform for win_platform? method, > and so doesn't install .bat files under JRuby > http://rubyforge.org/tracker/index.php?func=detail&aid=20379&group_id=126&atid=575 > > Any objections to including in the next maintenance release? None. I've marked them as high priority so I shouldn't forget. From drbrain at segment7.net Tue May 27 14:59:59 2008 From: drbrain at segment7.net (Eric Hodel) Date: Tue, 27 May 2008 11:59:59 -0700 Subject: [Rubygems-developers] A couple patches to help JRuby In-Reply-To: <483B79EB.2060903@sun.com> References: <483B7667.3040802@sun.com> <483B79EB.2060903@sun.com> Message-ID: On May 26, 2008, at 20:03 PM, Charles Oliver Nutter wrote: > Charles Oliver Nutter wrote: >> FYI, there's a couple bugs with patches that hopefully can get into >> the next maintenance release. We've modified them locally, but we'd >> like to avoid the juggling act we have to do when upgrading: > > Here's another: > > [#20380] RubyGems installs using wrong executable name in JRuby > under Windows > http://rubyforge.org/tracker/index.php?func=detail&aid=20380&group_id=126&atid=575 > > In this case, because RubyGems always sticks EXEEXT on the end of > RUBY_INSTALL_NAME, we end up with an executable named jruby.bat.exe, > which of course doesn't run. I don't have a good patch for this one, > so I'm looking for suggestions. Either RubyGems needs to not append > when RUBY_INSTALL_NAME has the full executable name, or JRuby needs > to instead report just "jruby" as RUBY_INSTALL_NAME" and then "bat" > as EXEEXT. However the latter seems a little weird, especially if > other code is expecting EXEEXT to be "exe". Might be able to handle this one with the default overrides we discussed. From drbrain at segment7.net Tue May 27 17:06:23 2008 From: drbrain at segment7.net (Eric Hodel) Date: Tue, 27 May 2008 14:06:23 -0700 Subject: [Rubygems-developers] HEADSUP: trunk unusable, new metadata updater Message-ID: I'm making a checkpoint commit for a new metadata updater that removes the bulk update phase. (lib/rubygems/spec_fetcher.rb) Tom will be testing out the new indexer in the next day or two, so trunk will be unusable against any gem repositories until then. Also, backwards compatibility with the bulk-update-style index hasn't been hooked up. From thewoolleyman at gmail.com Tue May 27 21:57:22 2008 From: thewoolleyman at gmail.com (Chad Woolley) Date: Tue, 27 May 2008 18:57:22 -0700 Subject: [Rubygems-developers] HEADSUP: trunk unusable, new metadata updater In-Reply-To: References: Message-ID: On Tue, May 27, 2008 at 2:06 PM, Eric Hodel wrote: > I'm making a checkpoint commit for a new metadata updater that removes the > bulk update phase. (lib/rubygems/spec_fetcher.rb) Can you make a tag for the last stable revision? From drbrain at segment7.net Tue May 27 22:30:06 2008 From: drbrain at segment7.net (Eric Hodel) Date: Tue, 27 May 2008 19:30:06 -0700 Subject: [Rubygems-developers] HEADSUP: trunk unusable, new metadata updater In-Reply-To: References: Message-ID: <20326ED7-5228-4DED-AE67-0FEE2A60B4A4@segment7.net> On May 27, 2008, at 18:57 PM, Chad Woolley wrote: > On Tue, May 27, 2008 at 2:06 PM, Eric Hodel > wrote: >> I'm making a checkpoint commit for a new metadata updater that >> removes the >> bulk update phase. (lib/rubygems/spec_fetcher.rb) > > Can you make a tag for the last stable revision? Tom has deployed the refactored and updated indexer, so now only backwards compatibility is missing. I'll be rolling that in tomorrow, so I think it will be ok.