OK, I''m once again talking about my future almighty isbn loader. I have written quite all the ruby code I need and, using a basic test, checked it works. Now, I''me having issues running the code. When I run webgen, I got the following error : C:\Documents and Settings\Maison\Bureau\nicolas-delsaux.is-a-geek>webgen C:/Documents and Settings/Maison/Bureau/nicolas-delsaux.is-a-geek/plugin/database/04_role.rb:1:in `load_plugin'': uniniti alized constant #<Module:0x33a1c74>::AbstractBaseEntry (NameError) from c:/ruby/lib/ruby/gems/1.8/gems/webgen-0.4.6/lib/webgen/plugin.rb:224:in `load_from_file'' from c:/ruby/lib/ruby/gems/1.8/gems/webgen-0.4.6/lib/webgen/plugin.rb:223:in `catch'' from c:/ruby/lib/ruby/gems/1.8/gems/webgen-0.4.6/lib/webgen/plugin.rb:223:in `load_from_file'' from c:/ruby/lib/ruby/gems/1.8/gems/webgen-0.4.6/lib/webgen/plugin.rb:237:in `load_from_block'' from c:/ruby/lib/ruby/gems/1.8/gems/webgen-0.4.6/lib/webgen/plugin.rb:237:in `catch'' from c:/ruby/lib/ruby/gems/1.8/gems/webgen-0.4.6/lib/webgen/plugin.rb:237:in `load_from_block'' from c:/ruby/lib/ruby/gems/1.8/gems/webgen-0.4.6/lib/webgen/plugin.rb:236:in `catch'' from c:/ruby/lib/ruby/gems/1.8/gems/webgen-0.4.6/lib/webgen/plugin.rb:236:in `load_from_block'' ... 11 levels... from c:/ruby/lib/ruby/gems/1.8/gems/webgen-0.4.6/lib/webgen/cli.rb:454:in `cli_main'' from c:/ruby/lib/ruby/gems/1.8/gems/webgen-0.4.6/bin/webgen:4 from c:/ruby/bin/webgen:18:in `load'' from c:/ruby/bin/webgen:18 My plugin folder hierarchy is as follow : plugin | filelist.rb | filemdate.rb | isbn_converter.rb | ndx_converter.rb | +---database | 01_definition.rb | 02_product.rb | 03_person.rb | 04_role.rb | \---grabbers amazon.rb noosfere.rb with class AbstractBaseEntry locate in 01_definition.rb file. i''ve used these prefixes in order to help werbgen loading all correctly, but it does not seems to work. Is there any thinkable workaround ? Or am I doing something just plain wrong ? I believe putting all database (well, kirbybase, in my case) code in one file would solve my issue, but I fear the remedy being worst than the evil, no ? -- Nicolas Delsaux N''imprimez ce mail que si vous ne savez pas le lire sur l''?cran : les ?lectrons se recyclent bien, le papier, beaucoup moins bien.
Am Sun, 9 Mar 2008 18:02:32 +0100 schrieb "Nicolas Delsaux" <nicolas.delsaux at gmail.com>:> OK, I''m once again talking about my future almighty isbn loader. > I have written quite all the ruby code I need and, using a basic test, > checked it works. > Now, I''me having issues running the code. > When I run webgen, I got the following error : > > C:\Documents and > Settings\Maison\Bureau\nicolas-delsaux.is-a-geek>webgen C:/Documents > and > Settings/Maison/Bureau/nicolas-delsaux.is-a-geek/plugin/database/04_role.rb:1:in > `load_plugin'': uniniti alized constant > #<Module:0x33a1c74>::AbstractBaseEntry (NameError) from > c:/ruby/lib/ruby/gems/1.8/gems/webgen-0.4.6/lib/webgen/plugin.rb:224:in > `load_from_file'' from > c:/ruby/lib/ruby/gems/1.8/gems/webgen-0.4.6/lib/webgen/plugin.rb:223:in > `catch'' from > c:/ruby/lib/ruby/gems/1.8/gems/webgen-0.4.6/lib/webgen/plugin.rb:223:in > `load_from_file'' from > c:/ruby/lib/ruby/gems/1.8/gems/webgen-0.4.6/lib/webgen/plugin.rb:237:in > `load_from_block'' from > c:/ruby/lib/ruby/gems/1.8/gems/webgen-0.4.6/lib/webgen/plugin.rb:237:in > `catch'' from > c:/ruby/lib/ruby/gems/1.8/gems/webgen-0.4.6/lib/webgen/plugin.rb:237:in > `load_from_block'' from > c:/ruby/lib/ruby/gems/1.8/gems/webgen-0.4.6/lib/webgen/plugin.rb:236:in > `catch'' from > c:/ruby/lib/ruby/gems/1.8/gems/webgen-0.4.6/lib/webgen/plugin.rb:236:in > `load_from_block'' ... 11 levels... > from > c:/ruby/lib/ruby/gems/1.8/gems/webgen-0.4.6/lib/webgen/cli.rb:454:in > `cli_main'' from > c:/ruby/lib/ruby/gems/1.8/gems/webgen-0.4.6/bin/webgen:4 from > c:/ruby/bin/webgen:18:in `load'' from c:/ruby/bin/webgen:18I can''t say anything with this stack trace only. Do you require the 01_definition.rb file in the plugin in which you use AbstractBaseEntry? You could also try using ::AbstractBaseEntry in the plugin file. If none of this works, could you post the plugin code? Would help me a lot. -- Thomas
On 3/9/08, Thomas Leitner <t_leitner at gmx.at> wrote:> > I can''t say anything with this stack trace only. Do you require the > 01_definition.rb file in the plugin in which you use AbstractBaseEntry?According to webgen documentation, I do absolutly no require in my plugin cdoe, expecting webgen to automagically require all the code in the plugin folder hierarchy.> You could also try using ::AbstractBaseEntry in the plugin file.OK, using that trick changed a little exception stack. now, there is no more t #<Module:0x33a1c74>:: in it, but the exception continue to be the same.> If > none of this works, could you post the plugin code? Would help me a lot.I guess so ;-) Well, you''ll have first to install kirbybase, since I generate a small db storing both products and persons locally (for better page generation), and Hpricot, but this one I think you already have installed. You''ll also have to create a page containing a isbn tag, like the following : <isbn value="AnISBNNumberLoadableFromAtLeastAmazon"/> Thanks for your help. -- Nicolas Delsaux N''imprimez ce mail que si vous ne savez pas le lire sur l''?cran : les ?lectrons se recyclent bien, le papier, beaucoup moins bien. -------------- next part -------------- A non-text attachment was scrubbed... Name: plugin.zip Type: application/zip Size: 12100 bytes Desc: not available Url : http://rubyforge.org/pipermail/webgen-users/attachments/20080310/e216bd29/attachment.zip