Hi, I''m testing the RC2 and find this bug while trying to run rails script/dbconsole E:\>ruby -v ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] E:\>ruby -e ''exec "notepad.exe", "test.txt"'' -e:1:in `exec'': No such file or directory - notepad.exe (Errno::ENOENT) from -e:1 E:\>ruby -e ''exec "notepad", "test.txt"'' E:\>ruby -e ''exec "notepad.exe"'' Note there is an error when I do exec ''notepad.exe'', ''test.txt'' Compare with the ruby in InstantRails 2.0: C:\rails2\rails_apps>ruby -v ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] C:\rails2\rails_apps>ruby -e ''exec "notepad.exe", "test.txt"'' C:\rails2\rails_apps>ruby -e ''exec "notepad", "test.txt"'' C:\rails2\rails_apps>ruby -e ''exec "notepad.exe"'' There is no such error. A regression perhaps? Wassallam, -- Zakaria z4k4ri4 at gmail.com Yahoo!: z4k4ri4 http://zakaria.is-a-geek.org http://pemula.linux.or.id Mau invite gmail? japri aja.
On Thu, Dec 18, 2008 at 9:41 AM, Zakaria <z4k4ri4 at gmail.com> wrote:> Hi, > > I''m testing the RC2 and find this bug while trying to run rails script/dbconsole > > E:\>ruby -v > ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] > E:\>ruby -e ''exec "notepad.exe", "test.txt"'' > -e:1:in `exec'': No such file or directory - notepad.exe (Errno::ENOENT) > from -e:1 > E:\>ruby -e ''exec "notepad", "test.txt"'' > E:\>ruby -e ''exec "notepad.exe"'' > > Note there is an error when I do exec ''notepad.exe'', ''test.txt'' > > Compare with the ruby in InstantRails 2.0: > > C:\rails2\rails_apps>ruby -v > ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] > C:\rails2\rails_apps>ruby -e ''exec "notepad.exe", "test.txt"'' > C:\rails2\rails_apps>ruby -e ''exec "notepad", "test.txt"'' > C:\rails2\rails_apps>ruby -e ''exec "notepad.exe"'' > > There is no such error. A regression perhaps? > > Wassallam, >Hello Zakaria. both exec() and system() calls are broken on Windows, mostly all the multiple arguments calls changed behavior from patchlevel 111 to 287. There is a discussion about that on ruby-core: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/20606 This is pure ruby problem, and currently we are bound to the binary releases officially made. I cannot suggest more than raise this issue to Ruby redmine, and hope you get heard. http://redmine.ruby-lang.org/ Regards, -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry
Yo Luis,> both exec() and system() calls are broken on Windows, mostly all the > multiple arguments calls changed behavior from patchlevel 111 to 287. >Seems to be the changes from p114 to p230: C:\>which ruby c:\ruby\bin\ruby.EXE C:\>ruby -v ruby 1.8.6 (2008-03-03 patchlevel 114) [i386-mswin32] C:\>ruby -e ''exec "notepad.exe", "test.txt"'' C:\>ruby -e ''exec "notepad", "test.txt"'' C:\>ruby -e ''exec "notepad.exe"'' C:\Workspace\ruby-1.8.6-p230\win32>which ruby C:\Workspace\ruby-1.8.6-p230\win32\ruby.EXE C:\Workspace\ruby-1.8.6-p230\win32>ruby -v ruby 1.8.6 (2008-06-20 patchlevel 230) [i386-mswin32] C:\Workspace\ruby-1.8.6-p230\win32>ruby -e ''exec "notepad.exe", "test.txt"'' -e:1:in `exec'': No such file or directory - notepad.exe (Errno::ENOENT) from -e:1 C:\Workspace\ruby-1.8.6-p230\win32>ruby -e ''exec "notepad", "test.txt"'' C:\Workspace\ruby-1.8.6-p230\win32>ruby -e ''exec "notepad.exe"'' /allen
On Fri, Dec 19, 2008 at 1:09 AM, Allen Hewes <allen at decisiv.net> wrote:> Yo Luis, > >> both exec() and system() calls are broken on Windows, mostly all the >> multiple arguments calls changed behavior from patchlevel 111 to 287. >> > > Seems to be the changes from p114 to p230: > C:\>which ruby > c:\ruby\bin\ruby.EXE > > C:\>ruby -v > ruby 1.8.6 (2008-03-03 patchlevel 114) [i386-mswin32] > > C:\>ruby -e ''exec "notepad.exe", "test.txt"'' > C:\>ruby -e ''exec "notepad", "test.txt"'' > C:\>ruby -e ''exec "notepad.exe"'' > > > C:\Workspace\ruby-1.8.6-p230\win32>which ruby > C:\Workspace\ruby-1.8.6-p230\win32\ruby.EXE > > C:\Workspace\ruby-1.8.6-p230\win32>ruby -v > ruby 1.8.6 (2008-06-20 patchlevel 230) [i386-mswin32] > > C:\Workspace\ruby-1.8.6-p230\win32>ruby -e ''exec "notepad.exe", "test.txt"'' > -e:1:in `exec'': No such file or directory - notepad.exe (Errno::ENOENT) > from -e:1 > C:\Workspace\ruby-1.8.6-p230\win32>ruby -e ''exec "notepad", "test.txt"'' > C:\Workspace\ruby-1.8.6-p230\win32>ruby -e ''exec "notepad.exe"'' >Thank you Allen. Yes, these changes were introduced in ruby itself, is not RubyInstaller (One-Click). Since we updated the reference Ruby to p287, now we are seeing those. Changes has been integrated in ruby-core for 1.9 and I believe soon these will be merged in 1.8 branch. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry