From noreply at rubyforge.org Wed Aug 25 00:47:39 2010 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 25 Aug 2010 00:47:39 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Bugs-28499 ] File.dirname should not consider trailing slashes Message-ID: <20100825044739.6D7C4185836B@rubyforge.org> Bugs item #28499, was opened at 2010-08-24 21:47 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=28499&group_id=85 Category: win32-file Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Daniel Berger (djberg96) Assigned to: Nobody (None) Summary: File.dirname should not consider trailing slashes Initial Comment: The PathRemoveFileSpec function says it removes the trailing file name and backslash from a path if present. However, this doesn't seem to be the case with the wide character functions: require 'win32/file' irb(main):005:0> File.dirname("//foo/bar/baz") => "\\foo\bar" irb(main):006:0> File.dirname("//foo/bar/baz/") => "\\foo\bar\baz" That is not correct. Regards Dan (me) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=28499&group_id=85 From noreply at rubyforge.org Wed Aug 25 01:52:31 2010 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 25 Aug 2010 01:52:31 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Bugs-28499 ] File.dirname should not consider trailing slashes Message-ID: <20100825055231.983E6185837A@rubyforge.org> Bugs item #28499, was opened at 2010-08-25 13:47 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=28499&group_id=85 Category: win32-file Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Daniel Berger (djberg96) Assigned to: Nobody (None) Summary: File.dirname should not consider trailing slashes Initial Comment: The PathRemoveFileSpec function says it removes the trailing file name and backslash from a path if present. However, this doesn't seem to be the case with the wide character functions: require 'win32/file' irb(main):005:0> File.dirname("//foo/bar/baz") => "\\foo\bar" irb(main):006:0> File.dirname("//foo/bar/baz/") => "\\foo\bar\baz" That is not correct. Regards Dan (me) ---------------------------------------------------------------------- >Comment By: Park Heesob (phasis68) Date: 2010-08-25 14:52 Message: Although I understand the behaviour, that is not correct in view of RubyDoc. Here is a simple patch. --- file.rb.org 2010-08-25 14:40:52.846324163 +0900 +++ file.rb 2010-08-25 14:40:52.734575269 +0900 @@ -514,7 +514,7 @@ # def dirname(file) raise TypeError unless file.is_a?(String) - file = multi_to_wide(file) + file = multi_to_wide(file.gsub(/[\/\]+$/,'')) # Convert slashes to backslashes for the Windows API functions file.tr!(File::SEPARATOR, File::ALT_SEPARATOR) Regards, Park Heesob ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=28499&group_id=85 From noreply at rubyforge.org Sun Aug 29 11:46:17 2010 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 29 Aug 2010 11:46:17 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Bugs-28499 ] File.dirname should not consider trailing slashes Message-ID: <20100829154617.14EA41858377@rubyforge.org> Bugs item #28499, was opened at 2010-08-24 21:47 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=28499&group_id=85 Category: win32-file Group: Code >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Daniel Berger (djberg96) >Assigned to: Daniel Berger (djberg96) Summary: File.dirname should not consider trailing slashes Initial Comment: The PathRemoveFileSpec function says it removes the trailing file name and backslash from a path if present. However, this doesn't seem to be the case with the wide character functions: require 'win32/file' irb(main):005:0> File.dirname("//foo/bar/baz") => "\\foo\bar" irb(main):006:0> File.dirname("//foo/bar/baz/") => "\\foo\bar\baz" That is not correct. Regards Dan (me) ---------------------------------------------------------------------- >Comment By: Daniel Berger (djberg96) Date: 2010-08-29 08:46 Message: Unfortunately that patch caused some other test failures. I ended up using PathRemoveBackslash, combined with a short circuit for empty paths, to solve it. I also added some more tests. Fixed in git, I'll push out a release tonight. Regards, Dan ---------------------------------------------------------------------- Comment By: Park Heesob (phasis68) Date: 2010-08-24 22:52 Message: Although I understand the behaviour, that is not correct in view of RubyDoc. Here is a simple patch. --- file.rb.org 2010-08-25 14:40:52.846324163 +0900 +++ file.rb 2010-08-25 14:40:52.734575269 +0900 @@ -514,7 +514,7 @@ # def dirname(file) raise TypeError unless file.is_a?(String) - file = multi_to_wide(file) + file = multi_to_wide(file.gsub(/[\/\]+$/,'')) # Convert slashes to backslashes for the Windows API functions file.tr!(File::SEPARATOR, File::ALT_SEPARATOR) Regards, Park Heesob ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=28499&group_id=85 From noreply at rubyforge.org Sun Aug 29 11:46:38 2010 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 29 Aug 2010 11:46:38 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Support Requests-28003 ] gem only includes 1.8 version Message-ID: <20100829154638.4F1B31858377@rubyforge.org> Support Requests item #28003, was opened at 2010-03-24 09:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=412&aid=28003&group_id=85 >Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Roger Pack (rogerdpack) Assigned to: Nobody (None) Summary: gem only includes 1.8 version Initial Comment: Currently in mingw: C:\dev\ruby\downloads>gem install win32-api Successfully installed win32-api-1.4.6-x86-mingw32 1 gem installed C:\dev\ruby\downloads>irb irb(main):001:0> exit C:\dev\ruby\downloads>ruby -v ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-mingw32] C:\dev\ruby\downloads>irb irb(main):001:0> require 'win32/api' # a popup appears saying "cannot find libmsvcrt18.dll" or something LoadError: 126: The specified module could not be found. - C:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/win32-api-1.4.6-x86-mingw32/lib/win32/api.so from (irb):1:in `require' from (irb):1 from C:/installs/ruby191p376/bin/irb:12:in `
' Works find with 1.8.6 though. Thanks. -rp ---------------------------------------------------------------------- Comment By: Roger Pack (rogerdpack) Date: 2010-04-24 14:03 Message: Currently I think gems forces you to package *both* binaries into one "fat binary" (which is what I do, using rake-compiler for cross compiling). Thanks! -rp ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2010-04-24 06:14 Message: I don't actually know how you're supposed to package binaries to multiple versions of Ruby. I'll have to ask. Regards, Dan ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=412&aid=28003&group_id=85 From noreply at rubyforge.org Mon Aug 30 13:58:00 2010 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 30 Aug 2010 13:58:00 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Bugs-27692 ] win32-service install error with 1.9.1 Message-ID: <20100830175800.AC751177993F@rubyforge.org> Bugs item #27692, was opened at 2010-01-15 13:27 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=27692&group_id=85 Category: win32-service Group: None Status: Open Resolution: None Priority: 3 Submitted By: Helder Aranha (hmspider) Assigned to: Nobody (None) Summary: win32-service install error with 1.9.1 Initial Comment: googled this for a while, no joy. goal is to install v0.5.2 in order to use mongrel_services gem on Vista. RubyGems Environment: - RUBYGEMS VERSION: 1.3.5 - RUBY VERSION: 1.9.1 (2009-07-16 patchlevel 243) [i386-mingw32] - INSTALLATION DIRECTORY: C:/Ruby/lib/ruby/gems/1.9.1 - RUBYGEMS PREFIX: C:/Ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5 - RUBY EXECUTABLE: C:/Ruby/bin/ruby.exe - EXECUTABLE DIRECTORY: C:/Ruby/bin - RUBYGEMS PLATFORMS: - ruby - x86-mingw32 - GEM PATHS: - C:/Ruby/lib/ruby/gems/1.9.1 - C:/.gem/ruby/1.9.1 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://gems.rubyforge.org/ c:/Ruby/bin/ruby.exe extconf.rb checking for RegisterServiceCtrlHandlerEx()... yes checking for EnumServicesStatusEx()... yes checking for QueryServiceStatusEx()... yes creating Makefile make gcc -I. -Ic:/Ruby/include/ruby-1.9.1/i386-mingw32 -I/c/Ruby/include/ruby-1.9.1/ruby/backward -I/c/Ruby/include/ruby-1.9.1 -I. -DHAVE_REGISTERSERVICECTRLHANDLEREX -DHAVE_ENUMSERVICESSTATUSEX -DHAVE_QUERYSERVICESTATUSEX -O2 -g -Wall -Wno-parentheses -o service.o -c service.c In file included from service.c:7: service.h: In function 'rb_get_dependencies': service.h:80: error: 'struct RArray' has no member named 'len' service.h: In function 'rb_get_controls_accepted': service.h:232: error: 'struct RArray' has no member named 'len' service.c: In function 'Service_Event_Dispatch': service.c:91: error: 'struct RArray' has no member named 'ptr' service.c:92: error: 'struct RArray' has no member named 'ptr' service.c: In function 'Ruby_Service_Ctrl': service.c:104: error: '__try' undeclared (first use in this function) service.c:104: error: (Each undeclared identifier is reported only once service.c:104: error: for each function it appears in.) service.c:105: error: expected ';' before '{' token service.c: In function 'Service_Ctrl': service.c:159: error: '__try' undeclared (first use in this function) service.c:160: error: expected ';' before '{' token service.c: In function 'service_configure': service.c:663: error: 'struct RArray' has no member named 'len' service.c:667: error: 'struct RArray' has no member named 'len' service.c:669: error: 'struct RArray' has no member named 'ptr' service.c:674: error: 'struct RArray' has no member named 'len' service.c: In function 'service_create': service.c:846: error: 'struct RArray' has no member named 'len' service.c:850: error: 'struct RArray' has no member named 'len' service.c:852: error: 'struct RArray' has no member named 'ptr' service.c:857: error: 'struct RArray' has no member named 'len' service.c: In function 'service_start': service.c:1562: error: 'struct RArray' has no member named 'len' service.c:1568: error: 'struct RArray' has no member named 'len' service.c:1570: error: 'struct RArray' has no member named 'len' service.c:1603: warning: passing argument 3 of 'StartServiceA' from incompatible pointer type c:\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/winsvc.h:239: note: expected 'const CHAR **' but argument is of type 'TCHAR **' make: *** [service.o] Error 1 ---------------------------------------------------------------------- Comment By: Jacques Petit (jrpetit) Date: 2010-08-30 17:58 Message: Comment out the SEH lines as they really don't add much. //__try { //} //__finally { //} The finally clause is used in this code as a guarantee that the critical section will be unlocked if an exception occurs. I prefer to just have the process die if an exception occurs at this layer and let ruby exit with an error. Since there isn't any exception trapping anyways, the critical section unlock is unneeded. Then manually build the gem in: c:\Ruby\lib\ruby\gems\1.9.1\gems\win32-service-0.7.1 gem build win32-service.gemspec ---------------------------------------------------------------------- Comment By: Murmansk Manny (murmansk) Date: 2010-05-23 15:08 Message: Waiting for 1.9.x compatibility. Any 0.7.1 preview? ---------------------------------------------------------------------- Comment By: nick ricketts (nightshade427) Date: 2010-02-21 18:20 Message: I got around this with binary install using "gem install win32-service --platform x86-mswin32" Hope this helps you out. ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2010-02-21 16:10 Message: There a couple of solutions. One is to finally roll out the pure Ruby version. I just haven't had time to look at in a while, nor test it with 1.9.x. I'm curious if we need the 2 separate files for 1.9.x, actually. The other, using the current code base, is to link in libseh and see if that works. Regards, Dan ---------------------------------------------------------------------- Comment By: nick ricketts (nightshade427) Date: 2010-02-08 22:39 Message: The problem is __try doesn't work with the new Window Ruby Installer since it is using MinGW. So the native ext wont build. It needs to be converted to be compatible with MinGW since that is the direction the windows ruby stuff is going. I wish I knew more about C so I could help out with it. ---------------------------------------------------------------------- Comment By: Luis Lavena (luislavena) Date: 2010-02-08 22:36 Message: Hello, Can you try the beta version of mongrel service? http://groups.google.com/group/rubyinstaller/browse_thread/thread/ad530be7daf1f2d9 ---------------------------------------------------------------------- Comment By: nick ricketts (nightshade427) Date: 2010-02-08 21:18 Message: Any get this working??? Installation of win32-service will fail as it uses SEH (Structured Exception Handling), something that is only 100% available under Microsoft compiler and not portable to GCC (MinGW) There is a library called libseh that mimics it, but is not 100% compatible. After that thing, RArray->len references should be changed to RARRAY_LEN macros instead. ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2010-01-31 15:31 Message: I've updated the code in git to make it compatible for 1.9.x. I'm working out some other issues, but look for 0.7.1 soon. Regards, Dan ---------------------------------------------------------------------- Comment By: Luis Lavena (luislavena) Date: 2010-01-15 16:27 Message: Installation of win32-service will fail as it uses SEH (Structured Exception Handling), something that is only 100% available under Microsoft compiler and not portable to GCC (MinGW) There is a library called libseh that mimics it, but is not 100% compatible. After that thing, RArray->len references should be changed to RARRAY_LEN macros instead. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=27692&group_id=85