grzesieq
|
Posted: January 07, 2010 09:58 by grzesieq
|
|
Hi, I need to compile my app to a single jar, and I need to use the spreadsheet gem in it. spreadsheet requires ruby-ole, and I unpacked both gems in lib/ruby. The process of creating the jar works fine, but when I execute the program, it crashes with the following message: Errno::ENOENT - No such file or directory - File not found -
file:/{redacted ;)}/package/jar/AccountTool.jar!/ruby_minus_ole_minus_1_dot_2_dot_10/lib/ole/types/../../../data/propids.yaml
yaml:144:in `initialize'
yaml:144:in `open'
yaml:144:in `load_file'
lib/ruby/ruby-ole-1.2.10/lib/ole/types/property_set.rb:26:in `require'
lib/ruby/ruby-ole-1.2.10/lib/ole/types.rb:2:in `require'The problematic code is: DATA = YAML.load_file(File.dirname(__FILE__) + '/../../../data/propids.yaml').
inject({}) { |hash, (key, value)| hash.update Clsid.parse(key) => value }Is there any way to make it possible to execute, or should I just fix it by hard-coding the yaml file into the ruby file as a string? tia, Grzesiek |
Compiling ruby-ole gem problem
Replies: 2 - Last Post: January 07, 2010 21:07
by: grzesieq
by: grzesieq
showing 1 - 3 of 3
Logan Barnett
|
Posted: January 07, 2010 19:10 by Logan Barnett
|
|
Grzesiek Is the problematic code part of the gem or part of your code? The biggest thing that stands out to me is the the fact that you have .. without using File.expand_path around the path. This has bit me a lot in the past when I wanted to reach back relatively in the path structure. Let us know if it works! -Logan |
Replies: 2 - Last Post: January 07, 2010 21:07
by: grzesieq
by: grzesieq







