From hgs at dmu.ac.uk Fri Feb 4 10:15:02 2005 From: hgs at dmu.ac.uk (Hugh Sasse Staff Elec Eng) Date: Fri Feb 4 10:17:46 2005 Subject: [Rubygems-developers] Upgrading? Message-ID: What have I missed about upgrading? brains# gem --version 0.8.1 brains# gem search -r rubygem *** REMOTE GEMS *** rubygems-update (0.8.4, 0.8.3, 0.8.1, 0.8.0) RubyGems Update GEM brains# gem install -r rubygems-update Attempting remote installation of 'rubygems-update' Successfully installed rubygems-update, version 0.8.4 Installing RDoc documentation for rubygems-update-0.8.4... WARNING: Generating RDoc on .gem that may not have RDoc. brains# gem --version 0.8.1 brains# I expected 0.8.4 as that last result. I should be able to update using gem [options] after installation, shouldn't I? Or will this only work after install the NEW tarball? Actually I expected gem update to fix this, but still... Thank you, Hugh From lyle.johnson at gmail.com Fri Feb 4 10:45:25 2005 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Fri Feb 4 10:42:16 2005 Subject: [Rubygems-developers] Upgrading? In-Reply-To: References: Message-ID: On Fri, 4 Feb 2005 15:15:02 +0000 (WET), Hugh Sasse Staff Elec Eng wrote: > What have I missed about upgrading? After you install the gem, i.e. gem install -r rubygems-update You need to follow up with this command: update_rubygems Yes, this tripped me up too for awhile. ;) Hope this helps, Lyle From halostatue at gmail.com Fri Feb 4 10:45:47 2005 From: halostatue at gmail.com (Austin Ziegler) Date: Fri Feb 4 10:42:38 2005 Subject: [Rubygems-developers] Upgrading? In-Reply-To: References: Message-ID: <9e7db911050204074516558830@mail.gmail.com> On Fri, 4 Feb 2005 15:15:02 +0000 (WET), Hugh Sasse Staff Elec Eng wrote: > What have I missed about upgrading? > > brains# gem --version > 0.8.1 > brains# gem search -r rubygem > > *** REMOTE GEMS *** > > rubygems-update (0.8.4, 0.8.3, 0.8.1, 0.8.0) > RubyGems Update GEM > brains# gem install -r rubygems-update > Attempting remote installation of 'rubygems-update' > Successfully installed rubygems-update, version 0.8.4 > Installing RDoc documentation for rubygems-update-0.8.4... > WARNING: Generating RDoc on .gem that may not have RDoc. > brains# gem --version > 0.8.1 > brains# > > I expected 0.8.4 as that last result. I should be able to update > using gem [options] after installation, shouldn't I? Or will this > only work after install the NEW tarball? > > Actually I expected gem update to fix this, but still... You'll need to run "update_rubygems" (I think) afterwards. RubyGems, for security reasons, does not run anything on install. However, I would *really* like a "postinstall" messages hash that looks something like this: Gem::Specification.new do |s| ... s.postinstall = { :default => "a standard message to be displayed to all platforms, even if there is a specific message.", :other => "a standard message to be displayed to all non-specified platforms.", :win32 => "a standard message to be displayed to Windows users" } end -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca From hgs at dmu.ac.uk Fri Feb 4 11:27:13 2005 From: hgs at dmu.ac.uk (Hugh Sasse Staff Elec Eng) Date: Fri Feb 4 11:24:44 2005 Subject: [Rubygems-developers] Upgrading? In-Reply-To: References: Message-ID: On Fri, 4 Feb 2005, Lyle Johnson wrote: > On Fri, 4 Feb 2005 15:15:02 +0000 (WET), Hugh Sasse Staff Elec Eng > wrote: > >> What have I missed about upgrading? > > After you install the gem, i.e. > > gem install -r rubygems-update > > You need to follow up with this command: > > update_rubygems Could this be rolled into the install process, or could it be made to emit some message about this, please? In the spirit of gems making things easy... > > Yes, this tripped me up too for awhile. ;) > > Hope this helps, Yes, thank you: Successfully built RubyGem Name: sources Version: 0.0.1 File: sources-0.0.1.gem brains# gem --version 0.8.4 brains# > > Lyle Hugh From hgs at dmu.ac.uk Fri Feb 4 11:41:00 2005 From: hgs at dmu.ac.uk (Hugh Sasse Staff Elec Eng) Date: Fri Feb 4 11:38:22 2005 Subject: [Rubygems-developers] Upgrading? In-Reply-To: <9e7db911050204074516558830@mail.gmail.com> References: <9e7db911050204074516558830@mail.gmail.com> Message-ID: On Fri, 4 Feb 2005, Austin Ziegler wrote: > On Fri, 4 Feb 2005 15:15:02 +0000 (WET), Hugh Sasse Staff Elec Eng > wrote: [...] >> Actually I expected gem update to fix this, but still... > > You'll need to run "update_rubygems" (I think) afterwards. RubyGems, > for security reasons, does not run anything on install. However, I Oh, I'd forgotten about that... > would *really* like a "postinstall" messages hash that looks something > like this: > > Gem::Specification.new do |s| > ... > s.postinstall = { :default => "a standard message to be displayed s/:default/:always/, I think. > to all platforms, even if there is a specific message.", > :other => "a standard message to be displayed to > all non-specified platforms.", > :win32 => "a standard message to be displayed to > Windows users" } Yes, this is a good idea. Indexed by RUBY_PLATFORM, perhaps. Obviously the hash could be constructed according to what happened during the buid so that's probably sufficiently flexible > end While wishing "could we have a `gem docs` command to remind people where to look for the /r?docs/ (and possibly say that there aren't any for a package), please?" end > > -austin Thank you, Hugh From chad at chadfowler.com Sat Feb 5 09:57:51 2005 From: chad at chadfowler.com (Chad Fowler) Date: Sat Feb 5 09:54:38 2005 Subject: [Rubygems-developers] Upgrading? In-Reply-To: <9e7db911050204074516558830@mail.gmail.com> References: <9e7db911050204074516558830@mail.gmail.com> Message-ID: On 04-Feb-05, at 10:45 AM, Austin Ziegler wrote: > On Fri, 4 Feb 2005 15:15:02 +0000 (WET), Hugh Sasse Staff Elec Eng > wrote: >> What have I missed about upgrading? >> >> brains# gem --version >> 0.8.1 >> brains# gem search -r rubygem >> >> *** REMOTE GEMS *** >> >> rubygems-update (0.8.4, 0.8.3, 0.8.1, 0.8.0) >> RubyGems Update GEM >> brains# gem install -r rubygems-update >> Attempting remote installation of 'rubygems-update' >> Successfully installed rubygems-update, version 0.8.4 >> Installing RDoc documentation for rubygems-update-0.8.4... >> WARNING: Generating RDoc on .gem that may not have RDoc. >> brains# gem --version >> 0.8.1 >> brains# >> >> I expected 0.8.4 as that last result. I should be able to update >> using gem [options] after installation, shouldn't I? Or will this >> only work after install the NEW tarball? >> >> Actually I expected gem update to fix this, but still... > > You'll need to run "update_rubygems" (I think) afterwards. RubyGems, > for security reasons, does not run anything on install. However, I > would *really* like a "postinstall" messages hash that looks something > like this: > > Gem::Specification.new do |s| > ... > s.postinstall = { :default => "a standard message to be displayed > to all platforms, even if there is a specific message.", > :other => "a standard message to be displayed to > all non-specified platforms.", > :win32 => "a standard message to be displayed to > Windows users" } > end > > Nice idea! Chad From assaph at gmail.com Mon Feb 7 18:30:09 2005 From: assaph at gmail.com (Assaph Mehr) Date: Mon Feb 7 18:26:53 2005 Subject: [Rubygems-developers] Good new on authenticating proxies! Message-ID: <3ff47be9050207153023ffda3e@mail.gmail.com> Hi Guys, Finally made gems work through our Corporate NTLM Authenticating Proxy! There are two issues: 1. NTLM Authentication I installed http://apserver.sourceforge.net/, which is a local proxy (on my machine) that does the NTLM authentication with the corporate one. I just point gems etc to this proxy as a non-authenticating one. It's written in python, but I won't hold it against it :-) 2. Gems patch I still got an error using gems through the proxy. The attached patch fixes this (done against CVS head). While this is pehaps not an ideal solution, it provides a workaround for anyone who's behind an NTLM proxy. Cheers, Assaph ps Re the error that was reported on ruby-talk with installing rubygems-update (Zlib::BufError), I get the same error. It's gems 0.8.4 (or latest CVS), ruby 1.8.2 (2004-11-06) [i386-mswin32] with the 1-Click installer on WinXP. I know ZLib is installed and working properly. -------------- next part -------------- A non-text attachment was scrubbed... Name: rubygems-proxy-patch.diff Type: application/octet-stream Size: 2202 bytes Desc: not available Url : http://rubyforge.org/pipermail/rubygems-developers/attachments/20050208/7d2da719/rubygems-proxy-patch.obj From chad at chadfowler.com Mon Feb 7 20:07:08 2005 From: chad at chadfowler.com (Chad Fowler) Date: Mon Feb 7 20:03:52 2005 Subject: [Rubygems-developers] Good new on authenticating proxies! In-Reply-To: <3ff47be9050207153023ffda3e@mail.gmail.com> References: <3ff47be9050207153023ffda3e@mail.gmail.com> Message-ID: Great, Assaph! I wonder how we should get the word out re: using apserver. Maybe we can throw it in the README. Thanks much for your patch! I'll apply it this evening after dinner. Regarding the Zlib BufError, it's strange that I have the exact same configuration as you and don't get the error. I hate that kind of bug. Chad On 07-Feb-05, at 6:30 PM, Assaph Mehr wrote: > Hi Guys, > > Finally made gems work through our Corporate NTLM Authenticating Proxy! > There are two issues: > > 1. NTLM Authentication > I installed http://apserver.sourceforge.net/, which is a local > proxy (on my machine) that does the NTLM authentication with the > corporate one. I just point gems etc to this proxy as a > non-authenticating one. It's written in python, but I won't hold it > against it :-) > > 2. Gems patch > I still got an error using gems through the proxy. The attached > patch fixes this (done against CVS head). > > > While this is pehaps not an ideal solution, it provides a workaround > for anyone who's behind an NTLM proxy. > > Cheers, > Assaph > > ps Re the error that was reported on ruby-talk with installing > rubygems-update (Zlib::BufError), I get the same error. It's gems > 0.8.4 (or latest CVS), ruby 1.8.2 (2004-11-06) [i386-mswin32] with > the 1-Click installer on WinXP. I know ZLib is installed and working > properly. > patch.diff>_______________________________________________ > Rubygems-developers mailing list > Rubygems-developers@rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers From assaph at gmail.com Mon Feb 7 20:13:15 2005 From: assaph at gmail.com (Assaph Mehr) Date: Mon Feb 7 20:10:00 2005 Subject: [Rubygems-developers] Good new on authenticating proxies! In-Reply-To: References: <3ff47be9050207153023ffda3e@mail.gmail.com> Message-ID: <3ff47be905020717135aaaed3f@mail.gmail.com> On Mon, 7 Feb 2005 20:07:08 -0500, Chad Fowler wrote: > Great, Assaph! I wonder how we should get the word out re: using > apserver. Maybe we can throw it in the README. Or a wiki page or wherever. But I wouldn't hold my breath for users to RTFM... > Thanks much for your patch! I'll apply it this evening after dinner. bon apetit! Please check the patch manually, as for some reason it picked a few lines that weren't changed (i'm unsure why as i've tested for whitespace). > Regarding the Zlib BufError, it's strange that I have the exact same > configuration as you and don't get the error. I hate that kind of bug. I know the feeling. Let me know if you want me to test anything: i'll be near the comp for the next (whimper) 8 hours... Cheers, Assaph From chad at chadfowler.com Mon Feb 7 20:27:20 2005 From: chad at chadfowler.com (Chad Fowler) Date: Mon Feb 7 20:24:00 2005 Subject: [Rubygems-developers] Good new on authenticating proxies! In-Reply-To: <3ff47be9050207153023ffda3e@mail.gmail.com> References: <3ff47be9050207153023ffda3e@mail.gmail.com> Message-ID: <3bbf8838821e01bd4cb2d754fb1e364d@chadfowler.com> On 07-Feb-05, at 6:30 PM, Assaph Mehr wrote: > > 2. Gems patch > I still got an error using gems through the proxy. The attached > patch fixes this (done against CVS head). > Assaph, I noticed that you changed the http.head() call in RemoteSourceFetcher to be http.get(). Was that required for your fix? The http.head() call was used to avoid downloading the entire remote source if it hasn't changed. I'm afraid things would get slower if we went back to http.get(). Chad From assaph at gmail.com Mon Feb 7 20:48:42 2005 From: assaph at gmail.com (Assaph Mehr) Date: Mon Feb 7 20:45:25 2005 Subject: [Rubygems-developers] Good new on authenticating proxies! In-Reply-To: <3bbf8838821e01bd4cb2d754fb1e364d@chadfowler.com> References: <3ff47be9050207153023ffda3e@mail.gmail.com> <3bbf8838821e01bd4cb2d754fb1e364d@chadfowler.com> Message-ID: <3ff47be90502071748b41f488@mail.gmail.com> > Assaph, I noticed that you changed the http.head() call in > RemoteSourceFetcher to be http.get(). Was that required for your fix? > The http.head() call was used to avoid downloading the entire remote > source if it hasn't changed. I'm afraid things would get slower if we > went back to http.get(). That is the essence of the fix :-) For some reason going thru this proxy kept timeing out of #head, but #get fixed it. I've just tested this as: resp = begin http.head(path) rescue Timeout::Error http.get(path) end which works. This will not slow down normal users, and still allow NTLM user to function (plus we can blame the proxy chain fro the slow down :-). Unfortunately we can't know if we need to do this or not by the proxy parameters only. The only other solution i can think of is a --use-http-get command line option. HTH, Assaph From jim at weirichhouse.org Wed Feb 9 00:30:32 2005 From: jim at weirichhouse.org (Jim Weirich) Date: Wed Feb 9 00:25:24 2005 Subject: [Rubygems-developers] Good new on authenticating proxies! In-Reply-To: <3ff47be90502071748b41f488@mail.gmail.com> References: <3ff47be9050207153023ffda3e@mail.gmail.com> <3bbf8838821e01bd4cb2d754fb1e364d@chadfowler.com> <3ff47be90502071748b41f488@mail.gmail.com> Message-ID: <200502090030.32813.jim@weirichhouse.org> On Monday 07 February 2005 08:48 pm, Assaph Mehr wrote: > For some reason going thru this proxy kept timeing out of #head, but > #get fixed it. I've just tested this as: > > resp = begin > http.head(path) > rescue Timeout::Error > http.get(path) > end How long does it take for the head call to time out? -- -- Jim Weirich jim@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 at weirichhouse.org Wed Feb 9 00:33:05 2005 From: jim at weirichhouse.org (Jim Weirich) Date: Wed Feb 9 00:27:51 2005 Subject: [Rubygems-developers] Minor fix to require error message Message-ID: <200502090033.05462.jim@weirichhouse.org> The fact that the custom require reports the wrong file name when it can't load a recursive require really got me stuck today. So I fixed it. When custom require fails to load a file via gems, it now rethrows the original exception that caused it to try gems in the first place. -- -- Jim Weirich jim@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 assaph at gmail.com Wed Feb 9 00:52:37 2005 From: assaph at gmail.com (Assaph Mehr) Date: Wed Feb 9 00:49:18 2005 Subject: [Rubygems-developers] Good new on authenticating proxies! In-Reply-To: <200502090030.32813.jim@weirichhouse.org> References: <3ff47be9050207153023ffda3e@mail.gmail.com> <3bbf8838821e01bd4cb2d754fb1e364d@chadfowler.com> <3ff47be90502071748b41f488@mail.gmail.com> <200502090030.32813.jim@weirichhouse.org> Message-ID: <3ff47be9050208215263dbe97d@mail.gmail.com> On Wed, 9 Feb 2005 00:30:32 -0500, Jim Weirich wrote: > On Monday 07 February 2005 08:48 pm, Assaph Mehr wrote: > > For some reason going thru this proxy kept timeing out of #head, but > > #get fixed it. I've just tested this as: > > > > resp = begin > > http.head(path) > > rescue Timeout::Error > > http.get(path) > > end > > How long does it take for the head call to time out? 60 seconds. Annoying but not critical. BTW, There's a Net::HTTP#read_timeout=(sec) setter in which you can control this. I've tried different values, but it doesn't seem to change the end result. Cheers, Assaph From marcel at vernix.org Wed Feb 9 02:06:36 2005 From: marcel at vernix.org (Marcel Molina Jr.) Date: Wed Feb 9 02:03:19 2005 Subject: [Rubygems-developers] Good new on authenticating proxies! In-Reply-To: <3ff47be9050208215263dbe97d@mail.gmail.com> References: <3ff47be9050207153023ffda3e@mail.gmail.com> <3bbf8838821e01bd4cb2d754fb1e364d@chadfowler.com> <3ff47be90502071748b41f488@mail.gmail.com> <200502090030.32813.jim@weirichhouse.org> <3ff47be9050208215263dbe97d@mail.gmail.com> Message-ID: <20050209070636.GM2288@simons-rock.edu> On Wed, Feb 09, 2005 at 04:52:37PM +1100, Assaph Mehr wrote: > On Wed, 9 Feb 2005 00:30:32 -0500, Jim Weirich wrote: > > On Monday 07 February 2005 08:48 pm, Assaph Mehr wrote: > > > For some reason going thru this proxy kept timeing out of #head, but > > > #get fixed it. I've just tested this as: > > > > > > resp = begin > > > http.head(path) > > > rescue Timeout::Error > > > http.get(path) > > > end > > > > How long does it take for the head call to time out? > > 60 seconds. Annoying but not critical. > > BTW, There's a Net::HTTP#read_timeout=(sec) setter in which you can > control this. I've tried different values, but it doesn't seem to > change the end result. Why not just use timeout.rb from the stdlib? marcel -- Marcel Molina Jr. From chad at chadfowler.com Wed Feb 9 06:47:59 2005 From: chad at chadfowler.com (Chad Fowler) Date: Wed Feb 9 06:44:42 2005 Subject: [Rubygems-developers] Good new on authenticating proxies! In-Reply-To: <20050209070636.GM2288@simons-rock.edu> References: <3ff47be9050207153023ffda3e@mail.gmail.com> <3bbf8838821e01bd4cb2d754fb1e364d@chadfowler.com> <3ff47be90502071748b41f488@mail.gmail.com> <200502090030.32813.jim@weirichhouse.org> <3ff47be9050208215263dbe97d@mail.gmail.com> <20050209070636.GM2288@simons-rock.edu> Message-ID: <8bed02a12de774cfcc8ae8a0fd80643d@chadfowler.com> On Feb 9, 2005, at 2:06 AM, Marcel Molina Jr. wrote: > On Wed, Feb 09, 2005 at 04:52:37PM +1100, Assaph Mehr wrote: >> On Wed, 9 Feb 2005 00:30:32 -0500, Jim Weirich >> wrote: >>> On Monday 07 February 2005 08:48 pm, Assaph Mehr wrote: >>>> For some reason going thru this proxy kept timeing out of #head, but >>>> #get fixed it. I've just tested this as: >>>> >>>> resp = begin >>>> http.head(path) >>>> rescue Timeout::Error >>>> http.get(path) >>>> end >>> >>> How long does it take for the head call to time out? >> >> 60 seconds. Annoying but not critical. >> >> BTW, There's a Net::HTTP#read_timeout=(sec) setter in which you can >> control this. I've tried different values, but it doesn't seem to >> change the end result. > > Why not just use timeout.rb from the stdlib? > > marcel > I was thinking the same, but I bet there's a valid answer to this question :) Assaph, can you telnet through the proxy and do a HEAD on RubyGems' yaml metadata directly? I'm wondering if we have a problem with the Ruby libs or if this is a general problem you're going to have because of your network config there. I don't know much about your proxy setup, so I may be asking for something that's just plain impossible. If not with telnet, perhaps wget or curl could do a HEAD for you? Very curious. Thanks, Chad From chad at chadfowler.com Wed Feb 9 06:58:19 2005 From: chad at chadfowler.com (Chad Fowler) Date: Wed Feb 9 06:55:03 2005 Subject: [Rubygems-developers] Minor fix to require error message In-Reply-To: <200502090033.05462.jim@weirichhouse.org> References: <200502090033.05462.jim@weirichhouse.org> Message-ID: <43fe8026816e86cad3ddc9a3d8bbf173@chadfowler.com> "Thanks!" * 1000000 :) Chad On Feb 9, 2005, at 12:33 AM, Jim Weirich wrote: > The fact that the custom require reports the wrong file name when it > can't > load a recursive require really got me stuck today. > > So I fixed it. > > When custom require fails to load a file via gems, it now rethrows the > original exception that caused it to try gems in the first place. > > -- > -- Jim Weirich jim@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@rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers From assaph at gmail.com Wed Feb 9 17:46:43 2005 From: assaph at gmail.com (Assaph Mehr) Date: Wed Feb 9 17:43:27 2005 Subject: [Rubygems-developers] Good new on authenticating proxies! In-Reply-To: <8bed02a12de774cfcc8ae8a0fd80643d@chadfowler.com> References: <3ff47be9050207153023ffda3e@mail.gmail.com> <3bbf8838821e01bd4cb2d754fb1e364d@chadfowler.com> <3ff47be90502071748b41f488@mail.gmail.com> <200502090030.32813.jim@weirichhouse.org> <3ff47be9050208215263dbe97d@mail.gmail.com> <20050209070636.GM2288@simons-rock.edu> <8bed02a12de774cfcc8ae8a0fd80643d@chadfowler.com> Message-ID: <3ff47be90502091446666344d7@mail.gmail.com> > Why not just use timeout.rb from the stdlib? I believe net/http already uses the timeout.rb. I base this on the observation that the exception being thrown is: c:/bin/ruby/lib/ruby/1.8/timeout.rb:42:in `rbuf_fill': execution expired (Timeout::Error) from c:/bin/ruby/lib/ruby/1.8/net/protocol.rb:196:in `timeout' from c:/bin/ruby/lib/ruby/1.8/timeout.rb:55:in `timeout' from c:/bin/ruby/lib/ruby/1.8/net/protocol.rb:196:in `rbuf_fill' .... > Assaph, can you telnet through the proxy and do a HEAD on RubyGems' > yaml metadata directly? I'm wondering if we have a problem with the > Ruby libs or if this is a general problem you're going to have because > of your network config there. I don't know much about your proxy > setup, so I may be asking for something that's just plain impossible. > > If not with telnet, perhaps wget or curl could do a HEAD for you? The proxy setup is as follows: I have the APS running on my machine. It is a non-authenticating proxy. It, in turn, forwards everything to the corporate proxy and does the NTLM authentication as required by the corporate one. I have tried with curl and I get the same results: getting just the head causes an error when going thru the APS. This is probably just an APS problem as I can get just the head through the corporate proxy (with curl). It seems like this is not ruby's or rubygems' fault in any way. Since this is a (bit ugly) workaround just for people behind NTLM proxies It probably deserves mostly documentation. You can support it passively by simplly attempting #get if #head fails, which should not impact the majority of the users. ... D'oh! Just tried with APS version 0.9.7 (I was using the latest version 0.9.8). It seems to work fine with this version! So all we need is documentation on how to use this (readme or wiki - i'll go write a wiki page soon). Please just note that other part of my patch (changes to gem_commands.rb) was a bug fix which I think should be added anyway. HTH, Assaph ps. I think I have finally understood our IT department security model. It's the time honored "Security by Stupidy". From assaph at gmail.com Wed Feb 9 17:27:00 2005 From: assaph at gmail.com (Assaph Mehr) Date: Wed Feb 9 17:47:00 2005 Subject: [Rubygems-developers] Good new on authenticating proxies! In-Reply-To: <8bed02a12de774cfcc8ae8a0fd80643d@chadfowler.com> References: <3ff47be9050207153023ffda3e@mail.gmail.com> <3bbf8838821e01bd4cb2d754fb1e364d@chadfowler.com> <3ff47be90502071748b41f488@mail.gmail.com> <200502090030.32813.jim@weirichhouse.org> <3ff47be9050208215263dbe97d@mail.gmail.com> <20050209070636.GM2288@simons-rock.edu> <8bed02a12de774cfcc8ae8a0fd80643d@chadfowler.com> Message-ID: <3ff47be905020914276639cd86@mail.gmail.com> > Why not just use timeout.rb from the stdlib? I believe net/http already uses the timeout.rb. I base this on the observation that the exception being thrown is: c:/bin/ruby/lib/ruby/1.8/timeout.rb:42:in `rbuf_fill': execution expired (Timeout::Error) from c:/bin/ruby/lib/ruby/1.8/net/protocol.rb:196:in `timeout' from c:/bin/ruby/lib/ruby/1.8/timeout.rb:55:in `timeout' from c:/bin/ruby/lib/ruby/1.8/net/protocol.rb:196:in `rbuf_fill' .... > Assaph, can you telnet through the proxy and do a HEAD on RubyGems' > yaml metadata directly? I'm wondering if we have a problem with the > Ruby libs or if this is a general problem you're going to have because > of your network config there. I don't know much about your proxy > setup, so I may be asking for something that's just plain impossible. > > If not with telnet, perhaps wget or curl could do a HEAD for you? The proxy setup is as follows: I have the APS running on my machine. It is a non-authenticating proxy. It in turn forwards everything to the corporate proxy and does the NTLM authentication as required by the corporate one. I have tried with curl and I get the same results: getting just the head causes an error. This is probably an APS problem as I can get just the head through the corporate proxy (with curl). HTH, Assaph ps. I think I have finally understood our IT department security model. It's the time honored "Security by Stupidy". From assaph at gmail.com Wed Feb 9 17:27:00 2005 From: assaph at gmail.com (Assaph Mehr) Date: Wed Feb 9 17:56:04 2005 Subject: [Rubygems-developers] Good new on authenticating proxies! In-Reply-To: <8bed02a12de774cfcc8ae8a0fd80643d@chadfowler.com> References: <3ff47be9050207153023ffda3e@mail.gmail.com> <3bbf8838821e01bd4cb2d754fb1e364d@chadfowler.com> <3ff47be90502071748b41f488@mail.gmail.com> <200502090030.32813.jim@weirichhouse.org> <3ff47be9050208215263dbe97d@mail.gmail.com> <20050209070636.GM2288@simons-rock.edu> <8bed02a12de774cfcc8ae8a0fd80643d@chadfowler.com> Message-ID: <3ff47be905020914276639cd86@mail.gmail.com> > Why not just use timeout.rb from the stdlib? I believe net/http already uses the timeout.rb. I base this on the observation that the exception being thrown is: c:/bin/ruby/lib/ruby/1.8/timeout.rb:42:in `rbuf_fill': execution expired (Timeout::Error) from c:/bin/ruby/lib/ruby/1.8/net/protocol.rb:196:in `timeout' from c:/bin/ruby/lib/ruby/1.8/timeout.rb:55:in `timeout' from c:/bin/ruby/lib/ruby/1.8/net/protocol.rb:196:in `rbuf_fill' .... > Assaph, can you telnet through the proxy and do a HEAD on RubyGems' > yaml metadata directly? I'm wondering if we have a problem with the > Ruby libs or if this is a general problem you're going to have because > of your network config there. I don't know much about your proxy > setup, so I may be asking for something that's just plain impossible. > > If not with telnet, perhaps wget or curl could do a HEAD for you? The proxy setup is as follows: I have the APS running on my machine. It is a non-authenticating proxy. It in turn forwards everything to the corporate proxy and does the NTLM authentication as required by the corporate one. I have tried with curl and I get the same results: getting just the head causes an error. This is probably an APS problem as I can get just the head through the corporate proxy (with curl). HTH, Assaph ps. I think I have finally understood our IT department security model. It's the time honored "Security by Stupidy". From assaph at gmail.com Thu Feb 10 17:01:58 2005 From: assaph at gmail.com (Assaph Mehr) Date: Thu Feb 10 16:59:42 2005 Subject: [Rubygems-developers] Good new on authenticating proxies! In-Reply-To: <3ff47be90502091446666344d7@mail.gmail.com> References: <3ff47be9050207153023ffda3e@mail.gmail.com> <3bbf8838821e01bd4cb2d754fb1e364d@chadfowler.com> <3ff47be90502071748b41f488@mail.gmail.com> <200502090030.32813.jim@weirichhouse.org> <3ff47be9050208215263dbe97d@mail.gmail.com> <20050209070636.GM2288@simons-rock.edu> <8bed02a12de774cfcc8ae8a0fd80643d@chadfowler.com> <3ff47be90502091446666344d7@mail.gmail.com> Message-ID: <3ff47be905021014016b61bf54@mail.gmail.com> > ... D'oh! > Just tried with APS version 0.9.7 (I was using the latest version > 0.9.8). It seems to work fine with this version! So all we need is > documentation on how to use this (readme or wiki - i'll go write a > wiki page soon). I've updated the RubyGems_FAQ page. Cheers, Assaph From assaph at gmail.com Thu Feb 10 17:01:58 2005 From: assaph at gmail.com (Assaph Mehr) Date: Thu Feb 10 17:03:40 2005 Subject: [Rubygems-developers] Good new on authenticating proxies! In-Reply-To: <3ff47be90502091446666344d7@mail.gmail.com> References: <3ff47be9050207153023ffda3e@mail.gmail.com> <3bbf8838821e01bd4cb2d754fb1e364d@chadfowler.com> <3ff47be90502071748b41f488@mail.gmail.com> <200502090030.32813.jim@weirichhouse.org> <3ff47be9050208215263dbe97d@mail.gmail.com> <20050209070636.GM2288@simons-rock.edu> <8bed02a12de774cfcc8ae8a0fd80643d@chadfowler.com> <3ff47be90502091446666344d7@mail.gmail.com> Message-ID: <3ff47be905021014016b61bf54@mail.gmail.com> > ... D'oh! > Just tried with APS version 0.9.7 (I was using the latest version > 0.9.8). It seems to work fine with this version! So all we need is > documentation on how to use this (readme or wiki - i'll go write a > wiki page soon). I've updated the RubyGems_FAQ page. Cheers, Assaph From chad at chadfowler.com Thu Feb 10 18:32:42 2005 From: chad at chadfowler.com (chad@chadfowler.com) Date: Thu Feb 10 17:23:02 2005 Subject: [Rubygems-developers] Good new on authenticating proxies! In-Reply-To: <3ff47be905021014016b61bf54@mail.gmail.com> References: <3ff47be9050207153023ffda3e@mail.gmail.com> <3bbf8838821e01bd4cb2d754fb1e364d@chadfowler.com> <3ff47be90502071748b41f488@mail.gmail.com> <200502090030.32813.jim@weirichhouse.org> <3ff47be9050208215263dbe97d@mail.gmail.com> <20050209070636.GM2288@simons-rock.edu> <8bed02a12de774cfcc8ae8a0fd80643d@chadfowler.com> <3ff47be90502091446666344d7@mail.gmail.com> <3ff47be905021014016b61bf54@mail.gmail.com> Message-ID: <56114.208.252.131.50.1108078362.squirrel@208.252.131.50> >> ... D'oh! >> Just tried with APS version 0.9.7 (I was using the latest version >> 0.9.8). It seems to work fine with this version! So all we need is >> documentation on how to use this (readme or wiki - i'll go write a >> wiki page soon). > > I've updated the RubyGems_FAQ page. > Thanks! That's a great find. Your work is much appreciated. Chad From patrick at hexane.org Sat Feb 19 02:59:11 2005 From: patrick at hexane.org (Patrick May) Date: Sat Feb 19 02:55:37 2005 Subject: [Rubygems-developers] packaging binary executables / etc Message-ID: <240D703A-824C-11D9-A987-000A95E48D34@hexane.org> Hello, I am working on the next release of Narf. This release of narf will contain a customized version of the ruby interpreter[1]. The Narf build scripts currently do a fine job of: if windows using a pre-compiled binary else compiling a new binary end installing this binary next to ruby. I saw these attributes in the gemspec: http://rubygems.rubyforge.org/wiki/wiki.pl?GemspecReference#executables http://rubygems.rubyforge.org/wiki/wiki.pl?GemspecReference#extensions But I wasn't sure if they would fit my needs. Narf.c embeds ruby in a web-customized executable. That executable is (and must be) a binary. How would I package the narf interpreter with a gem? Thanks, Patrick 1. You need to get into the interpreter to a.) run as a cgi and b.) report syntax errors in cgi-scripts to the browser. From chad at chadfowler.com Sat Feb 19 08:14:12 2005 From: chad at chadfowler.com (Chad Fowler) Date: Sat Feb 19 08:10:32 2005 Subject: [Rubygems-developers] packaging binary executables / etc In-Reply-To: <240D703A-824C-11D9-A987-000A95E48D34@hexane.org> References: <240D703A-824C-11D9-A987-000A95E48D34@hexane.org> Message-ID: On 19-Feb-05, at 2:59 AM, Patrick May wrote: > Hello, > > I am working on the next release of Narf. This release of narf will > contain a customized version of the ruby interpreter[1]. The Narf > build scripts currently do a fine job of: > > if windows > using a pre-compiled binary > else > compiling a new binary > end > installing this binary next to ruby. > > I saw these attributes in the gemspec: > > > http://rubygems.rubyforge.org/wiki/wiki.pl? > GemspecReference#executables > > http://rubygems.rubyforge.org/wiki/wiki.pl?GemspecReference#extensions > > But I wasn't sure if they would fit my needs. Narf.c embeds ruby in a > web-customized executable. That executable is (and must be) a binary. > How would I package the narf interpreter with a gem? > > Thanks, > > Patrick > > 1. You need to get into the interpreter to a.) run as a cgi and b.) > report syntax errors in cgi-scripts to the browser. > > Hi Patrick, "executables" is meant to be a list of executable programs that your gem will install (like the "rake" and "rails" scripts from their respective distributions). "extensions" is a list of extconf.rb's that will be executed to create makefiles. I don't think we have any way right now to have one of these executables 1) compile first or 2) be anything other than a Ruby script. We'd have to do some hacking to allow it. What's led you to distribute a customized ruby interpreter? Chad From jim at weirichhouse.org Sat Feb 19 10:37:21 2005 From: jim at weirichhouse.org (Jim Weirich) Date: Sat Feb 19 10:33:42 2005 Subject: [Rubygems-developers] packaging binary executables / etc In-Reply-To: <240D703A-824C-11D9-A987-000A95E48D34@hexane.org> References: <240D703A-824C-11D9-A987-000A95E48D34@hexane.org> Message-ID: <200502191037.21198.jim@weirichhouse.org> On Saturday 19 February 2005 02:59 am, Patrick May wrote: > Hello, > > I am working on the next release of Narf. This release of narf will > contain a customized version of the ruby interpreter[1]. The Narf > build scripts currently do a fine job of: > > if windows > using a pre-compiled binary > else > compiling a new binary > end > installing this binary next to ruby. I think what you want to do is create two gems. One platform independent gem that does a compile and one platform specific gem that carries the binary for the specific platform for which it is targetted. I've done this with the x10 gem, providing a platform specific windows binary so windows folk don't have to compile. It almost works OK but for the following exceptions: (1) The Rake gem build task doesn't support binary/platform specific gem creation. That's an easy thing to fix (and to workaround). (2) The gem install command gets a bit confused when there is both a platform independent and platform specific gem available with the same version number. This is on my short list of things to fix in gems. The short term fix is to given them different versions. -- -- Jim Weirich jim@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 patrick at hexane.org Sat Feb 19 17:22:51 2005 From: patrick at hexane.org (Patrick May) Date: Sat Feb 19 17:19:15 2005 Subject: [Rubygems-developers] packaging binary executables / etc In-Reply-To: Message-ID: Hello, I checked out the x10 Rakefile: http://rubyforge.org/cgi-bin/viewcvs.cgi/x10-cm17a/ Rakefile?rev=HEAD&cvsroot=x10-cm17a&content-type=text/vnd.viewcvs-markup It is using the spec.extensions property, which doesn't quite fit what I am doing. I'd like to distribute my binary application as a gem. Is there a hook I can use to compile and install this software via gems? May be I could add such a hook -- how should I go about adding this functionality to rubygems? or, is this such a weird example that it is outside the scope of rubygems? > What's led you to distribute a customized ruby interpreter? You need a web-aware interpreter for cgi-scripts to return errors to the browser properly. The problem is that syntax errors cause ruby to exit *before* executing your code. And syntax errors are very common. So, you can build error reporting into methods like: cgi.out { ... } or Web::process { ... } but you won't catch syntax errors like: Webprocess{ ... } For this type of error, ruby will print out an error message that looks good in a command shell. For a cgi script this message is replaced by an ugly 500 error from the webserver. By getting into the interpreter, I can send the browser the syntax error, attractively formatted. PHP does a similar thing. In the windows pre-compiled zips, there is the web interpreter and a command line interpreter. This is what I am looking to deploy with narf. Sorry if this is a bit of an aside, I know this isn't narf-lib-devel@sf.net Cheers, Patrick From jim at weirichhouse.org Sun Feb 20 07:00:27 2005 From: jim at weirichhouse.org (Jim Weirich) Date: Sun Feb 20 07:01:52 2005 Subject: [Rubygems-developers] packaging binary executables / etc In-Reply-To: References: Message-ID: <200502200700.27406.jim@weirichhouse.org> On Saturday 19 February 2005 05:22 pm, Patrick May wrote: > Hello, > > I checked out the x10 Rakefile: > > http://rubyforge.org/cgi-bin/viewcvs.cgi/x10-cm17a/ > Rakefile?rev=HEAD&cvsroot=x10-cm17a&content-type=text/vnd.viewcvs-markup > > It is using the spec.extensions property, which doesn't quite fit what > I am doing. Oh, of course. I hadn't quite thought through exactly what you were doing. Hmmm ... I don't have any quick answers for you. You are exploring turf that is a bit outside the intended domain of RubyGems. The only thing I can think of is to use the extensions feature, but somehow fake it out to do what you want. Don't know if that is even feasible tho. -- -- Jim Weirich jim@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 patrick at hexane.org Sun Feb 20 16:26:43 2005 From: patrick at hexane.org (Patrick May) Date: Sun Feb 20 16:23:07 2005 Subject: [Rubygems-developers] packaging binary executables / etc In-Reply-To: <200502200700.27406.jim@weirichhouse.org> Message-ID: <1DA6B268-8386-11D9-BCDF-000A95E48D34@hexane.org> Jim, On Sunday, February 20, 2005, at 07:00 AM, Jim Weirich wrote: > The only thing I can think of is to use the extensions feature, but > somehow > fake it out to do what you want. Don't know if that is even feasible > tho. I'll play around, and see what I discover :-) Cheers, Patrick From mike at lepton.fr Sat Feb 5 12:35:58 2005 From: mike at lepton.fr (Michael Witrant) Date: Mon Mar 7 13:56:59 2005 Subject: [Rubygems-developers] Patch to fix custom_require Message-ID: <20050205183904.5d734f9b@photon.lepton> Anyone to apply the patch I added in the comment of bug #1290? http://rubyforge.org/tracker/?func=detail&atid=575&aid=1290&group_id=126 mike From Reid.Thompson at ateb.com Mon Feb 28 11:53:19 2005 From: Reid.Thompson at ateb.com (Reid Thompson) Date: Mon Mar 7 13:57:00 2005 Subject: [Rubygems-developers] why does 'gem install og' result in installation of log4r rather than installation of og? Message-ID: Reid Thompson Ateb, Inc www.ateb.com 919.872.1275 Direct Dial 919.882.4960