Hi, I did a debug run myself which verified your result. See the attached text file - start from the bottom up. I included everything that seemed relevant. The last gems call is, as you said site_ruby/1.8/rubygems/open-uri.rb:545: http.request_get (uri.to_s, header) {|response| It eventually hangs in C:/ruby/lib/ruby/1.8/net/protocol.rb:266: len = @socket.write(str) So yes, it has to do with writing to a socket. And the socket is created there: C:/ruby/lib/ruby/1.8/net/protocol.rb:83: @socket = TCPsocket.new(@address, @port) I am not sure how to get around the problem. If we find a workaround to make gems work, most likely other things will break. I suppose the problem needs a fix at a deeper level... Nik Maximilian Schöfmann [c] wrote:> Hi Nik, > > in the meantime I did some more "investigation" determined the following > frustrating facts: > > FC3 Linux ... works! > Ubuntu Linuix ... works! > WinXP SP1 ... works! > Win98 ... even this works (after renaming gem*.cmd to gem*.bat) > > I have a very similar setup on my PCs - except ZoneAlarm. I use Tiny > Personal FW on one and the Windows FW only on the other machine - have > never had problems with any program that uses networking. I use AntiVir > PersonalEdition Classic. > I also have cygwin and skype installed but when I tried the gem > installer the last time I killed all unneeded processes (didn''t help, of > course). > > I did a little debugging on the gem code and found the place where it > stucks. As I already suspected, it''s not rubygems that causes the problem. > In \ruby\lib\ruby\site_ruby\1.8\rubygems\open-uri.rb a funtion from > Net:HTTP is called (the source of the call is remote_installer.rb which > tries to donload yaml.Z from rubygems.org where the gems are listed). > Net:HTTP is found in \ruby\lib\ruby\1.8\net\http.rb and dates back to > 2004/12/15 - long after SP2 but before Microsofts patch 893066 > (2005/04/12) which restricts the possibility to use "raw sockets". > Although such a restriction was already introduced in SP2, the new one > seems to be more restrictive... > I will try to remove the patch from my less important machine and also > hope to get my hands on a pc with a freshly installed XP SP2 without any > patches and will try it there. If it works, I''ll install the patch and > try again. > Hopefully we''ll have an answer then. So if that''s really the problem, > it''s a problem of rubys socket implementation (I traced the error until > line 1167 ("sock.write buf") in http.rb) > > I will post back to the list when I know more. > > Regards, > Max >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On , rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org <> wrote:> Hi, > > I did a debug run myself which verified your result. See the attached > text file - start from the bottom up. I included everything that seemed > relevant. > > The last gems call is, as you said > site_ruby/1.8/rubygems/open-uri.rb:545: > http.request_get (uri.to_s, header) {|response| > > It eventually hangs in > C:/ruby/lib/ruby/1.8/net/protocol.rb:266: > len = @socket.write(str) > > So yes, it has to do with writing to a socket. > > And the socket is created there: > C:/ruby/lib/ruby/1.8/net/protocol.rb:83: > @socket = TCPsocket.new(@address, @port) > > I am not sure how to get around the problem. If we find a workaround to > make gems work, most likely other things will break. I suppose the > problem needs a fix at a deeper level... > > Nik >I had this problem with PGP 9.0, and opened a topic on their forum: http://forums.pgpsupport.com/viewtopic.php?p=12735#12735. They claim: It looks like Ruby has the same problem that older versions of Perl had with LSPs (the layered service provider method that PGP and others use to hook into the network stream). These Unix crossover apps like to use sockets as filehandles, which current win32 non-IFS LSPs can''t support. I posted the issue on this list a couple of weeks ago, and asked if this were the right place to do so, and got no response at all. The person at PGP also posted a fix to the 1.9 version of win32.c to the url above, and did some verification it got the socket properly. Unfortunately, I do not know how to apply the patch, and do not know how to forward this to the Ruby developers. If anyone else knows how to do so, please try it. -- Jim McMaster mailto:jim.mcmaster-Wuw85uim5zDR7s880joybQ@public.gmane.org _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On 6/27/05, Jim McMaster <jim.mcmaster-Wuw85uim5zDR7s880joybQ@public.gmane.org> wrote:> Unfortunately, > I do not know how to apply the patch, and do not know how to forward this to > the Ruby developers. If anyone else knows how to do so, please try it.You can find out how to join/post to the ruby-core mailing list here: http://www.ruby-lang.org/en/20020104.html You can read through the archives here: http://blade.nagaokaut.ac.jp/ruby/ruby-core/index.shtml> -- > Jim McMaster > mailto:jim.mcmaster-Wuw85uim5zDR7s880joybQ@public.gmane.org >-- Bill Guindon (aka aGorilla)
>I had this problem with PGP 9.0, and opened a topic on their forum: >http://forums.pgpsupport.com/viewtopic.php?p=12735#12735. They claim: > >It looks like Ruby has the same problem that older versions >of Perl had with LSPs (the layered service provider method >that PGP and others use to hook into the network >stream). These Unix crossover apps like to use sockets >as filehandles, which current win32 non-IFS LSPs can''t >support. > > >Ok, now that really seems to be problem. I had Ciphire Mail running on both of my machines, and after uninstalling it, everything works now. Hopefully they will fix this in the next ruby release. Max
Hi,> > I am not sure how to get around the problem. If we find a workaround > to make gems work, most likely other things will break. I suppose the > problem needs a fix at a deeper level...After the post from Jim McMaster who could put down his problems to PGP, I could finally solve mine, too. I had Ciphire Mail installed, which - like PGP - hooks into the network stream to (de)cypher emails. Just deactivating it wasn''t enough - I had to uninstall it. Now the rails installation works! I suppose that other programs with this behaviour, like antivirus-software which scans the email traffic automatically etc., may cause similar problems. Of course this is just a workaround if one can do without the particular software, the bug itself remains and has to be solved by the ruby developers. Max
Awesome! Thanks for letting us know. I am pretty sure it''s down to ZoneAlarm now - this is exactly what it does. Unfortunately, I can''t uninstall it or I would potentially compromise the LAN... This is a laptop which gets exposed to all kinds of untrusted networks... Side-note: It''s not the firewall blocking Ruby - that could be configured. It''s the low level networking driver which doesn''t allow Ruby to write to TCP sockets. The driver only goes away on a complete uninstall. Simply shutting down the firewall doesn''t help. Nik Maximilian Schöfmann wrote:> Hi, > > >>I am not sure how to get around the problem. If we find a workaround >>to make gems work, most likely other things will break. I suppose the >>problem needs a fix at a deeper level... > > > After the post from Jim McMaster who could put down his problems to PGP, > I could finally solve mine, too. I had Ciphire Mail installed, which - > like PGP - hooks into the network stream to (de)cypher emails. > Just deactivating it wasn''t enough - I had to uninstall it. Now the > rails installation works! > I suppose that other programs with this behaviour, like > antivirus-software which scans the email traffic automatically etc., may > cause similar problems. > Of course this is just a workaround if one can do without the particular > software, the bug itself remains and has to be solved by the ruby > developers. > > Max > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >