Hello all, I''m having trouble with the WIN32 file opening. I don''t'' know how to tell if this is a WIN32OLE issue or an issue with the application (Adobe Illustrator CS2) Review the included files below, which exist within a rails application. When IllustratorMinimalTest is run, #testFullPath succeeds, #testFileName fails. Thanks in advance for any advice on how to enable file-name-only referencing to these files. Why ? Mostly learning. I can use the full path OK in my current test, but I''m looking for a way to not break the tests if the project is moved on disk. Thanks. Peter J. Fitzgibbons Applications Manager Lakewood Homes - "The American Dream Builder"(r) Peter.Fitzgibbons-STCS76aLmhk1y/cD6r8xzl6hYfS7NtTn@public.gmane.org (847) 884-8800 ========================== IllustratorMinimal.rb ============================require ''win32ole'' class IllustratorMinimal attr_accessor :cs, :doc def initialize(filename) puts "IllustratorMinimal context path is:#{File.dirname(__FILE__)}" @cs = WIN32OLE.new(''Illustrator.Application'') @doc = @cs.Open(filename) end End ============================================================================== ====================== IllustratorMinimalTest.rb =============================require ''test/unit'' require ''lib/illustratorminimal'' class IllustratorMinimalTest < Test::Unit::TestCase def testFullPath cs IllustratorMinimal.new("D:/svn-sandboxFSFS/ruby/salesmapper/lib/../Test1 .ai") assert_not_nil cs.doc end def testFileName cs = IllustratorMinimal.new("..\Test1.ai") assert_not_nil cs.doc end End ================================================================================== ======================= Test results =========================================Loaded suite D:/svn-sandboxFSFS/ruby/salesmapper/test/unit/IllustratorMnimalTest Started IllustratorMinimal context path is:D:\svn-sandboxFSFS\ruby\salesmapper/lib EIllustratorMinimal context path is:D:\svn-sandboxFSFS\ruby\salesmapper/lib . Finished in 0.062 seconds. 1) Error: testFileName(IllustratorMinimalTest): WIN32OLERuntimeError: Open OLE error code:800404DA in Adobe Illustrator Illegal argument - argument 1 - Required value is missing HRESULT error code:0x80020009 Exception occurred. D:\svn-sandboxFSFS\ruby\salesmapper/lib/illustratorminimal.rb:8:in `method_missing'' D:\svn-sandboxFSFS\ruby\salesmapper/lib/illustratorminimal.rb:8:in `initialize'' D:/svn-sandboxFSFS/ruby/salesmapper/test/unit/IllustratorMnimalTest.rb:1 1:in `new'' D:/svn-sandboxFSFS/ruby/salesmapper/test/unit/IllustratorMnimalTest.rb:1 1:in `testFileName'' 2 tests, 1 assertions, 0 failures, 1 errors ============================================================================== _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails