view · edit · sidebar · attach · print · history

Index>

20160411-textinfo-error

Summary

  • Error in import-daily Textinfo NoMethodError
  • Fix error in YDIM html

Commits

Index

Keep in Mind for work to do
  • Fix dojo error http://www.sitepen.com/blog/2012/10/31/debugging-dojo-common-error-messages/#forgot-dom-ready
  • I removed on May-27 tests for ix_registrationss, fix_sequences, fix_compositions, fix_packages from test/test_plugin/swissmedic.rb,as he could not find any references for them in the src code. Did I erroneously remove stuff when cleaning up the swissmedic import earlier?
  • The whole test for older/newer Packages must be adapted to xlsx. One must compare the rows (e.g. by creating csv files) and do the same stuff in xlsx!
  • creat gem: task: input=file with ean-codes, standard output show ean-codes + atc-code. Source is Swissmedic Packungen.xlsx or XML.
  • Import via data/medreg_companies.yaml
  • Fix problem with radioactivatum 99m-technetio when parsing Wirkstoffe
  • Fix galenic_forms when parsing swissmedic.xlsx
  • Cleanup generic_type. Replace it everywhere by sl_generic_type and adapt code accordingly.
  • Get updated ATC-codes from EPha for oddb.org, too.
  • Use refdatabase for oddb.org, too.
  • Check whether we should revert the part which touche src/plugin/text_info.rb of commit 17af82ba4d76a5838683411b260de265531f9e74. We should improve test/stub/oddbapp.rb to work similar for update/pointer as the real oddbapp. In this case we would have a good Stub for plugins. May we need a different stub when working with plugins (which create/modify/destroy ODDB-Objects), when in most other cases a very simple stub is sufficient.
  • When a logged in admin user changes an atc_code of a product, the corresponding atc_class must update its sequences, too.
  • Order of entering search type and value should not matter. Both should show long URL with search
  • Remove parser for minifi (but keep the minifi)
  • BSV-Plugin does not send mail. Is it sending two mails at once?
  • remove obsolete pdf_patinfo in model, admin/views

Error in import-daily Textinfo NoMethodError

Must fix the following error

016-04-09 07:28:43 +0200: /var/www/oddb.org/src/plugin/text_info.rb:1335:in `report_problematic_names': created /var/www/oddb.org/log/problematic_fi_pi.lst
2016-04-09 07:28:43 +0200: /var/www/oddb.org/src/plugin/text_info.rb:1438:in `import_swissmedicinfo': After parse_aips_download we have  13343 items to parse. Having 25157 meta items.  
2016-04-09 07:35:01 +0200: /var/www/oddb.org/src/plugin/text_info.rb:1410:in `get_swissmedicinfo_changed_items': get_swissmedicinfo_changed_items 0 @new_iksnrs
2016-04-09 07:35:18 CESTlog notify Error: Fach- und Patienteninfo Updates (swissmedicinfo.ch): start outgoing process ["log"]. Must attach 0 files and 0 parts.
Plugin: ODDB::TextInfoPlugin
Error: NoMethodError
Message: undefined method `packages' for "Xeloda\u00AE":String
Backtrace:
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing'
/var/www/oddb.org/src/model/registration.rb:241:in `block in packages'
/var/www/oddb.org/src/model/registration.rb:240:in `each'
/var/www/oddb.org/src/model/registration.rb:240:in `inject'
/var/www/oddb.org/src/model/registration.rb:240:in `packages'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing'
/var/www/oddb.org/src/plugin/text_info.rb:1194:in `get_textinfo'
/var/www/oddb.org/src/plugin/text_info.rb:1451:in `block in import_swissmedicinfo'
/var/www/oddb.org/src/plugin/text_info.rb:1449:in `each'
/var/www/oddb.org/src/plugin/text_info.rb:1449:in `import_swissmedicinfo'
/var/www/oddb.org/src/util/updater.rb:560:in `block in update_notify_simple'
/var/www/oddb.org/src/util/updater.rb:536:in `call'
/var/www/oddb.org/src/util/updater.rb:536:in `wrap_update'
/var/www/oddb.org/src/util/updater.rb:554:in `update_notify_simple'
/var/www/oddb.org/src/util/updater.rb:333:in `update_textinfo_swissmedicinfo'
/var/www/oddb.org/src/util/updater.rb:200:in `run'
jobs/import_daily:13:in `block in <module:Util>'
/var/www/oddb.org/src/util/job.rb:40:in `call'
/var/www/oddb.org/src/util/job.rb:40:in `run'
jobs/import_daily:12:in `<module:Util>'
jobs/import_daily:11:in `<module:ODDB>'
jobs/import_daily:10:in `<main>'

This problem seems to have gone away. I could find and registration which is of class String or does not have a method packages. Verified on oddb_ci2 and thinpower using the following bin/admin snippet

ch.oddb> $x = registrations.values.find_all{|reg| !reg.respond_to?(:packages)}
-> []
ch.oddb>  $x = registrations.values.find_all{|reg| reg.is_a?(String)}
-> []
ch.oddb>  $x = registrations.values.find_all{|reg| !reg.is_a?(ODDB::Registration)}
-> []

Fix error in YDIM html

We must fix a RangeError which appeared since we switched from mod_ruby 1.8 -> 1.9 . The backtrace is

@4000000056e8554f2c3c7874 /var/www/ydim.ywesee.com/lib/ydim/html/view/htmlgrid.rb:17: warning: already initialized constant HTTP_HEADERS
@4000000056e8554f2c3c842c /var/www/ydim.ywesee.com/lib/ydim/html/view/htmlgrid.rb:80: warning: already initialized constant STRIPED_BG
@4000000056e8554f34f0259c /var/www/ydim.ywesee.com/lib/ydim/html.rb:3: warning: already initialized constant VERSION
@4000000056e85c4a0376c1c4 /var/www/ydim.ywesee.com/lib/ydim/html/view/htmlgrid.rb:17: warning: already initialized constant HTTP_HEADERS
@4000000056e85c4a0378d11c /var/www/ydim.ywesee.com/lib/ydim/html/view/htmlgrid.rb:80: warning: already initialized constant STRIPED_BG
@4000000056e85c4a0ba82b44 /var/www/ydim.ywesee.com/lib/ydim/html.rb:3: warning: already initialized constant VERSION
@4000000056e88389172a5604 /var/www/ydim.ywesee.com/lib/ydim/html/view/htmlgrid.rb:17: warning: already initialized constant HTTP_HEADERS
@4000000056e8838917ec716c /var/www/ydim.ywesee.com/lib/ydim/html/view/htmlgrid.rb:80: warning: already initialized constant STRIPED_BG
@4000000056e8838920be510c /var/www/ydim.ywesee.com/lib/ydim/html.rb:3: warning: already initialized constant VERSION
@4000000056e8853e15b46774 /var/www/ydim.ywesee.com/lib/ydim/html/view/htmlgrid.rb:17: warning: already initialized constant HTTP_HEADERS
@4000000056e8853e167c6a94 /var/www/ydim.ywesee.com/lib/ydim/html/view/htmlgrid.rb:80: warning: already initialized constant STRIPED_BG
@4000000056e8853e1e8898d4 /var/www/ydim.ywesee.com/lib/ydim/html.rb:3: warning: already initialized constant VERSION
@4000000056e885a70016ba5c /var/www/ydim.ywesee.com/lib/ydim/html/view/htmlgrid.rb:17: warning: already initialized constant HTTP_HEADERS
@4000000056e885a700d9f2ec /var/www/ydim.ywesee.com/lib/ydim/html/view/htmlgrid.rb:80: warning: already initialized constant STRIPED_BG
@4000000056e885a70ae7dccc /var/www/ydim.ywesee.com/lib/ydim/html.rb:3: warning: already initialized constant VERSION
@4000000056e8876b24bdd0ac /var/www/ydim.ywesee.com/lib/ydim/html/view/htmlgrid.rb:17: warning: already initialized constant HTTP_HEADERS
@4000000056e8876b24bf768c /var/www/ydim.ywesee.com/lib/ydim/html/view/htmlgrid.rb:80: warning: already initialized constant STRIPED_BG
@4000000056e8876b2b847314 /var/www/ydim.ywesee.com/lib/ydim/html.rb:3: warning: already initialized constant VERSION
@4000000056efc5e31800766c error in SBSM::Session#to_html: /de
@4000000056efc5e318007e3c RangeError
@4000000056efc5e318007e3c 0x3ff973764484 is recycled object
@4000000056efc5e318007e3c (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:375:in `_id2ref'
@4000000056efc5e318008224 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:375:in `to_obj'
@4000000056efc5e318008224 (druby://192.168.0.36:12375) /usr/lib64/ruby/site_ruby/1.8/odba/drbwrapper.rb:70:in `to_obj'
@4000000056efc5e31800860c (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1403:in `to_obj'
@4000000056efc5e3180427bc (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1705:in `to_obj'
@4000000056efc5e318042ba4 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:613:in `recv_request'
@4000000056efc5e318042ba4 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:911:in `recv_request'
@4000000056efc5e318042f8c (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1531:in `init_with_client'
@4000000056efc5e318043f2c (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1543:in `setup_message'
@4000000056efc5e318043f2c (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1495:in `perform'
@4000000056efc5e318044314 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1590:in `main_loop'
@4000000056efc5e318044314 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1586:in `loop'
@4000000056efc5e318046254 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1586:in `main_loop'
@4000000056efc5e318046254 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1582:in `start'
@4000000056efc5e31804663c (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1582:in `main_loop'
@4000000056efc5e31804663c (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1431:in `run'
@4000000056efc5e3180471f4 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1428:in `start'
@4000000056efc5e3180475dc (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1428:in `run'
@4000000056efc5e3180475dc (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1348:in `initialize'
@4000000056efc5e3180475dc (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1628:in `new'
@4000000056efc5e3180479c4 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1628:in `start_service'
@4000000056efc5e318080bd4 (druby://192.168.0.36:12375) /usr/bin/ydimd:46
@4000000056efc5e318080bd4 /usr/lib64/ruby/site_ruby/1.8/sbsm/drb.rb:15:in `respond_to?'
@4000000056efc5e318080fbc /usr/lib64/ruby/site_ruby/1.8/htmlgrid/value.rb:33:in `init'
@4000000056efc5e318080fbc /usr/lib64/ruby/site_ruby/1.8/htmlgrid/component.rb:138:in `initialize'
@4000000056efc5e318080fbc /usr/lib64/ruby/site_ruby/1.8/htmlgrid/namedcomponent.rb:34:in `initialize'
@4000000056efc5e3180832e4 /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:145:in `new'
@4000000056efc5e3180832e4 /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:145:in `create'
@4000000056efc5e3180832e4 /usr/lib64/ruby/site_ruby/1.8/htmlgrid/divcomposite.rb:33:in `compose'
@4000000056efc5e3180836cc /usr/lib64/ruby/site_ruby/1.8/htmlgrid/divcomposite.rb:13:in `each'
@4000000056efc5e3180836cc /usr/lib64/ruby/site_ruby/1.8/htmlgrid/divcomposite.rb:13:in `compose'
@4000000056efc5e318084284 /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:55:in `init'
@4000000056efc5e318084284 /usr/lib64/ruby/site_ruby/1.8/htmlgrid/component.rb:138:in `initialize'
@4000000056efc5e318084284 /usr/lib64/ruby/site_ruby/1.8/sbsm/state.rb:243:in `new'
@4000000056efc5e31808466c /usr/lib64/ruby/site_ruby/1.8/sbsm/state.rb:243:in `view'
@4000000056efc5e31808466c /usr/lib64/ruby/site_ruby/1.8/sbsm/state.rb:179:in `to_html'
@4000000056efc5e318085224 /usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:442:in `to_html'
@4000000056efc5e318085224 /usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:169:in `drb_process'
@4000000056efc5e31808560c /usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:167:in `synchronize'
@4000000056efc5e31808560c /usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:167:in `drb_process'
@4000000056efc5e31808560c /usr/lib64/ruby/1.8/drb/drb.rb:1555:in `__send__'
@4000000056efc5e3180861c4 /usr/lib64/ruby/1.8/drb/drb.rb:1555:in `perform_without_block'
@4000000056efc5e318088104 /usr/lib64/ruby/1.8/drb/drb.rb:1515:in `perform'
@4000000056efc5e318088104 /usr/lib64/ruby/1.8/drb/drb.rb:1589:in `main_loop'
@4000000056efc5e3180884ec /usr/lib64/ruby/1.8/drb/drb.rb:1585:in `loop'
@4000000056efc5e3180884ec /usr/lib64/ruby/1.8/drb/drb.rb:1585:in `main_loop'
@4000000056efc5e3180884ec /usr/lib64/ruby/1.8/drb/drb.rb:1581:in `start'
@4000000056efc5e3180884ec /usr/lib64/ruby/1.8/drb/drb.rb:1581:in `main_loop'
@4000000056efc5e3180890a4 /usr/lib64/ruby/1.8/drb/drb.rb:1430:in `run'
@4000000056efc5e3180890a4 /usr/lib64/ruby/1.8/drb/drb.rb:1427:in `start'
@4000000056efc5e31808948c /usr/lib64/ruby/1.8/drb/drb.rb:1427:in `run'
@4000000056efc5e31808948c /usr/lib64/ruby/1.8/drb/drb.rb:1347:in `initialize'
@4000000056efc5e31808948c /usr/lib64/ruby/1.8/drb/drb.rb:1627:in `new'
@4000000056efc5e318089874 /usr/lib64/ruby/1.8/drb/drb.rb:1627:in `start_service'
@4000000056efc5e31808a044 /var/www/ydim.ywesee.com/bin/ydim-htmld:35
@4000000056efc5e31808a044 YDIM::Html::View::Debitors::COMPONENTS[[0, 0]] in create(subnavigation)
@4000000056efc5e91e78d994 error in SBSM::Session#to_html: /
@4000000056efc5e91e78e164 RangeError
@4000000056efc5e91e78e164 0x3ff973764484 is recycled object
@4000000056efc5e91e78e54c (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:375:in `_id2ref'
@4000000056efc5e91e78e54c (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:375:in `to_obj'
@4000000056efc5e91e78e934 (druby://192.168.0.36:12375) /usr/lib64/ruby/site_ruby/1.8/odba/drbwrapper.rb:70:in `to_obj'
@4000000056efc5e91e78e934 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1403:in `to_obj'
@4000000056efc5e91e7923cc (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1705:in `to_obj'
@4000000056efc5e91e7923cc (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:613:in `recv_request'
@4000000056efc5e91e7927b4 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:911:in `recv_request'
@4000000056efc5e91e7927b4 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1531:in `init_with_client'
@4000000056efc5e91e79bc24 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1543:in `setup_message'
@4000000056efc5e91e79bc24 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1495:in `perform'
@4000000056efc5e91e79c00c (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1590:in `main_loop'
@4000000056efc5e91e79c00c (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1586:in `loop'
@4000000056efc5e91e79db64 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1586:in `main_loop'
@4000000056efc5e91e79df4c (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1582:in `start'
@4000000056efc5e91e79df4c (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1582:in `main_loop'
@4000000056efc5e91e79e334 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1431:in `run'
@4000000056efc5e91e79eeec (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1428:in `start'
@4000000056efc5e91e79f2d4 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1428:in `run'
@4000000056efc5e91e79f2d4 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1348:in `initialize'
@4000000056efc5e91e79f2d4 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1628:in `new'
@4000000056efc5e91e79f6bc (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1628:in `start_service'
@4000000056efc5e91e7a0274 (druby://192.168.0.36:12375) /usr/bin/ydimd:46
@4000000056efc5e91e7a065c /usr/lib64/ruby/site_ruby/1.8/sbsm/drb.rb:15:in `respond_to?'
@4000000056efc5e91e7a065c /usr/lib64/ruby/site_ruby/1.8/htmlgrid/value.rb:33:in `init'
@4000000056efc5e91e7a065c /usr/lib64/ruby/site_ruby/1.8/htmlgrid/component.rb:138:in `initialize'
@4000000056efc5e91e7a0a44 /usr/lib64/ruby/site_ruby/1.8/htmlgrid/namedcomponent.rb:34:in `initialize'
@4000000056efc5e91e7a21b4 /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:145:in `new'
@4000000056efc5e91e7a259c /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:145:in `create'
@4000000056efc5e91e7a259c /usr/lib64/ruby/site_ruby/1.8/htmlgrid/divcomposite.rb:33:in `compose'
@4000000056efc5e91e7a259c /usr/lib64/ruby/site_ruby/1.8/htmlgrid/divcomposite.rb:13:in `each'
@4000000056efc5e91e7a2984 /usr/lib64/ruby/site_ruby/1.8/htmlgrid/divcomposite.rb:13:in `compose'
@4000000056efc5e91e7a353c /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:55:in `init'
@4000000056efc5e91e7a353c /usr/lib64/ruby/site_ruby/1.8/htmlgrid/component.rb:138:in `initialize'
@4000000056efc5e91e7a353c /usr/lib64/ruby/site_ruby/1.8/sbsm/state.rb:243:in `new'
@4000000056efc5e91e7a3924 /usr/lib64/ruby/site_ruby/1.8/sbsm/state.rb:243:in `view'
@4000000056efc5e91e7a3924 /usr/lib64/ruby/site_ruby/1.8/sbsm/state.rb:179:in `to_html'
@4000000056efc5e91e7a44dc /usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:442:in `to_html'
@4000000056efc5e91e7a44dc /usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:169:in `drb_process'
@4000000056efc5e91e7a44dc /usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:167:in `synchronize'
@4000000056efc5e91e7a48c4 /usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:167:in `drb_process'
@4000000056efc5e91e7a48c4 /usr/lib64/ruby/1.8/drb/drb.rb:1555:in `__send__'
@4000000056efc5e91e7a5094 /usr/lib64/ruby/1.8/drb/drb.rb:1555:in `perform_without_block'
@4000000056efc5e91e7a6fd4 /usr/lib64/ruby/1.8/drb/drb.rb:1515:in `perform'
@4000000056efc5e91e7a6fd4 /usr/lib64/ruby/1.8/drb/drb.rb:1589:in `main_loop'
@4000000056efc5e91e7a73bc /usr/lib64/ruby/1.8/drb/drb.rb:1585:in `loop'
@4000000056efc5e91e7a73bc /usr/lib64/ruby/1.8/drb/drb.rb:1585:in `main_loop'
@4000000056efc5e91e7a73bc /usr/lib64/ruby/1.8/drb/drb.rb:1581:in `start'
@4000000056efc5e91e7a77a4 /usr/lib64/ruby/1.8/drb/drb.rb:1581:in `main_loop'
@4000000056efc5e91e7aae54 /usr/lib64/ruby/1.8/drb/drb.rb:1430:in `run'
@4000000056efc5e91e7aae54 /usr/lib64/ruby/1.8/drb/drb.rb:1427:in `start'
@4000000056efc5e91e7afc74 /usr/lib64/ruby/1.8/drb/drb.rb:1427:in `run'
@4000000056efc5e91e7afc74 /usr/lib64/ruby/1.8/drb/drb.rb:1347:in `initialize'
@4000000056efc5e91e7afc74 /usr/lib64/ruby/1.8/drb/drb.rb:1627:in `new'
@4000000056efc5e91e7b005c /usr/lib64/ruby/1.8/drb/drb.rb:1627:in `start_service'
@4000000056efc5e91e7b0c14 /var/www/ydim.ywesee.com/bin/ydim-htmld:35
@4000000056efc5e91e7b0c14 YDIM::Html::View::Debitors::COMPONENTS[[0, 0]] in create(subnavigation)
@4000000056efc6542841bf7c error in SBSM::Session#to_html: /de
@4000000056efc6542841c74c RangeError
@4000000056efc6542841cb34 0x3ff973764484 is not id value
@4000000056efc6542841cb34 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:375:in `_id2ref'
@4000000056efc6542841cb34 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:375:in `to_obj'
@4000000056efc6542841cf1c (druby://192.168.0.36:12375) /usr/lib64/ruby/site_ruby/1.8/odba/drbwrapper.rb:70:in `to_obj'
@4000000056efc6542841cf1c (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1403:in `to_obj'
@4000000056efc65428421184 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1705:in `to_obj'
@4000000056efc65428421184 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:613:in `recv_request'
@4000000056efc6542842156c (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:911:in `recv_request'
@4000000056efc6542842156c (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1531:in `init_with_client'
@4000000056efc65428422124 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1543:in `setup_message'
@4000000056efc6542842250c (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1495:in `perform'
@4000000056efc6542842250c (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1590:in `main_loop'
@4000000056efc654284228f4 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1586:in `loop'
@4000000056efc65428424834 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1586:in `main_loop'
@4000000056efc65428424c1c (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1582:in `start'
@4000000056efc65428424c1c (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1582:in `main_loop'
@4000000056efc65428425004 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1431:in `run'
@4000000056efc654284257d4 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1428:in `start'
@4000000056efc65428425bbc (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1428:in `run'
@4000000056efc65428425bbc (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1348:in `initialize'
@4000000056efc65428425bbc (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1628:in `new'
@4000000056efc65428425fa4 (druby://192.168.0.36:12375) /usr/lib64/ruby/1.8/drb/drb.rb:1628:in `start_service'
@4000000056efc65428426774 (druby://192.168.0.36:12375) /usr/bin/ydimd:46
@4000000056efc65428426b5c /usr/lib64/ruby/site_ruby/1.8/sbsm/drb.rb:15:in `respond_to?'
@4000000056efc65428426b5c /usr/lib64/ruby/site_ruby/1.8/htmlgrid/value.rb:33:in `init'
@4000000056efc65428426f44 /usr/lib64/ruby/site_ruby/1.8/htmlgrid/component.rb:138:in `initialize'
@4000000056efc65428426f44 /usr/lib64/ruby/site_ruby/1.8/htmlgrid/namedcomponent.rb:34:in `initialize'
@4000000056efc654284286b4 /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:145:in `new'
@4000000056efc654284286b4 /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:145:in `create'
@4000000056efc65428428a9c /usr/lib64/ruby/site_ruby/1.8/htmlgrid/divcomposite.rb:33:in `compose'
@4000000056efc65428428a9c /usr/lib64/ruby/site_ruby/1.8/htmlgrid/divcomposite.rb:13:in `each'
@4000000056efc65428428e84 /usr/lib64/ruby/site_ruby/1.8/htmlgrid/divcomposite.rb:13:in `compose'
@4000000056efc65428429654 /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:55:in `init'
@4000000056efc65428429a3c /usr/lib64/ruby/site_ruby/1.8/htmlgrid/component.rb:138:in `initialize'
@4000000056efc65428429a3c /usr/lib64/ruby/site_ruby/1.8/sbsm/state.rb:243:in `new'
@4000000056efc65428429e24 /usr/lib64/ruby/site_ruby/1.8/sbsm/state.rb:243:in `view'
@4000000056efc65428429e24 /usr/lib64/ruby/site_ruby/1.8/sbsm/state.rb:179:in `to_html'
@4000000056efc65428431b24 /usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:442:in `to_html'
@4000000056efc65428431f0c /usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:169:in `drb_process'
@4000000056efc65428431f0c /usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:167:in `synchronize'
@4000000056efc654284322f4 /usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:167:in `drb_process'
@4000000056efc654284322f4 /usr/lib64/ruby/1.8/drb/drb.rb:1555:in `__send__'
@4000000056efc65428432eac /usr/lib64/ruby/1.8/drb/drb.rb:1555:in `perform_without_block'
@4000000056efc65428434dec /usr/lib64/ruby/1.8/drb/drb.rb:1515:in `perform'
@4000000056efc65428434dec /usr/lib64/ruby/1.8/drb/drb.rb:1589:in `main_loop'
@4000000056efc65428434dec /usr/lib64/ruby/1.8/drb/drb.rb:1585:in `loop'
@4000000056efc654284351d4 /usr/lib64/ruby/1.8/drb/drb.rb:1585:in `main_loop'
@4000000056efc654284351d4 /usr/lib64/ruby/1.8/drb/drb.rb:1581:in `start'
@4000000056efc654284351d4 /usr/lib64/ruby/1.8/drb/drb.rb:1581:in `main_loop'
@4000000056efc65428435d8c /usr/lib64/ruby/1.8/drb/drb.rb:1430:in `run'
@4000000056efc65428435d8c /usr/lib64/ruby/1.8/drb/drb.rb:1427:in `start'
@4000000056efc65428435d8c /usr/lib64/ruby/1.8/drb/drb.rb:1427:in `run'
@4000000056efc65428436174 /usr/lib64/ruby/1.8/drb/drb.rb:1347:in `initialize'
@4000000056efc65428436174 /usr/lib64/ruby/1.8/drb/drb.rb:1627:in `new'
@4000000056efc65428436174 /usr/lib64/ruby/1.8/drb/drb.rb:1627:in `start_service'
@4000000056efc65428436944 /var/www/ydim.ywesee.com/bin/ydim-htmld:35
@4000000056efc65428436d2c YDIM::Html::View::Debitors::COMPONENTS[[0, 0]] in create(subnavigation)
@4000000056efc6741ddb8c0c /var/www/ydim.ywesee.com/lib/ydim/html/view/htmlgrid.rb:17: warning: already initialized constant HTTP_HEADERS
@4000000056efc6741ddc2c34 /var/www/ydim.ywesee.com/lib/ydim/html/view/htmlgrid.rb:80: warning: already initialized constant STRIPED_BG
@4000000056efc6742215ab7c /var/www/ydim.ywesee.com/lib/ydim/html.rb:3: warning: already initialized constant VERSION
@400000005703d3652dbbb5d4 /var/www/ydim.ywesee.com/lib/ydim/html/view/htmlgrid.rb:17: warning: already initialized constant HTTP_HEADERS
@400000005703d3652dbf3844 /var/www/ydim.ywesee.com/lib/ydim/html/view/htmlgrid.rb:80: warning: already initialized constant STRIPED_BG
@400000005703d3660c69ae54 /var/www/ydim.ywesee.com/lib/ydim/html.rb:3: warning: already initialized constant VERSION
@400000005703d9b41087b274 /var/www/ydim.ywesee.com/lib/ydim/html/view/htmlgrid.rb:17: warning: already initialized constant HTTP_HEADERS
@400000005703d9b41089258c /var/www/ydim.ywesee.com/lib/ydim/html/view/htmlgrid.rb:80: warning: already initialized constant STRIPED_BG
@400000005703d9b41f969604 /var/www/ydim.ywesee.com/lib/ydim/html.rb:3: warning: already initialized constant VERSION

The corresponding apache logs look like this:

wesee@thinpower /var/www/ydim.ywesee.com $ cat log/error_log
[Mon Apr 11 02:20:16 2016] [error] [client 54.153.33.145] access to /var/www/ydim.ywesee.com/doc/index.rbx failed, reason: SSL connection required
[Mon Apr 11 02:54:26 2016] [error] [client 141.212.122.129] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /x
[Mon Apr 11 06:59:30 2016] [error] [client 5.255.253.23] access to /var/www/ydim.ywesee.com/doc/robots.txt failed, reason: SSL connection required
[Mon Apr 11 06:59:34 2016] [error] [client 5.255.253.23] access to /var/www/ydim.ywesee.com/doc/index.rbx failed, reason: SSL connection required
ywesee@thinpower /var/www/ydim.ywesee.com $ cat log/access_log
159.203.175.29 - - [11/Apr/2016:01:47:42 +0200] "GET / HTTP/1.1" 200 1596 "-" "Netcraft SSL Server Survey - contact info@netcraft.com"
54.153.33.145 - - [11/Apr/2016:02:20:16 +0200] "GET / HTTP/1.1" 302 270 "-" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"
141.212.122.129 - - [11/Apr/2016:02:54:26 +0200] "GET /x HTTP/1.1" 400 291 "-" "Telesphoreo"
66.249.78.174 - - [11/Apr/2016:05:27:51 +0200] "GET /robots.txt HTTP/1.1" 200 - "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
66.249.64.159 - - [11/Apr/2016:05:27:52 +0200] "GET /resources/ydim.css HTTP/1.1" 200 1650 "https://ydim.ywesee.com/" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
141.8.142.8 - - [11/Apr/2016:06:59:30 +0200] "GET /robots.txt HTTP/1.1" 200 - "-" "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)"
5.255.253.23 - - [11/Apr/2016:06:59:30 +0200] "GET /robots.txt HTTP/1.1" 302 273 "-" "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)"
5.255.253.23 - - [11/Apr/2016:06:59:34 +0200] "GET / HTTP/1.1" 302 273 "-" "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)"
141.8.142.8 - - [11/Apr/2016:06:59:33 +0200] "GET / HTTP/1.1" 200 1596 "-" "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)"
141.8.132.49 - - [11/Apr/2016:06:59:38 +0200] "GET / HTTP/1.1" 200 1596 "-" "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)"

But first I must add ydim to my oddb-ci2 setup. Copying and adapting the ydim.conf. Remarked that on github/davatz/ydim there are quite a few commits about ruby 1.8/1.9 compatibility which are not yet in present on thinpower /var/www/ydim where the last commit is de0e5128ae7bedeeff68a56e278e38b8e569f0ed by Masas on Thu Dec 30 08:02:01 2010 +0100 Changed the display of MwSt. from 7.6% to 8.0%

As verified by looking at /service/ydim-html/run and /service/ydim/run both services run as Ruby 1.8.6 on thinpower. Also the following files/directories are not in the github tree:

git status
Auf Branch master
Unversionierte Dateien:
  (benutzen Sie "git add <Datei>...", um die Änderungen zum Commit vorzumerken)

        data/
        doc/favicon.ico
        doc/robots.txt
        etc/
        log/
        svc/
        webalizer.bak/
        webalizer/

Could not find the commit de0e5128ae7bedeeff68a56e278e38b8e569f0ed under github/zdavatz/ydim. But only in ydim-html. Looking at the http://dev.ywesee.com/Masa/20101227-setup-ydim I find that he cpied bin, doc, lib dirctories from ydim-html to ydim. Also pdfinvoice is used in this project. Decided to add all these files to the ydim gem to ease installing and testing. Got a little bit confused by the naming. Therefore resuming here my analyis.

  • The YDIM-Gem contains server/client code and is used in
    • server: ydim-html
    • client: oddb.org
  • Source HTML-Interface YDIM for ydim.ywesee.com lives https://github.com/zdavatz/ydim-html
  • YDIM needs the needle gem. The needle gem does not work neither under Ruby 1.9 nor 2.0. But 2.1 and higher are okay.
  • Therefore installing ruby 2.3.0 on oddb-ci2 via rbenv and trying to make the ydim-html to work.
  • But first trying to make it run via ruby 1.8.7

Changes needed to run were:

  • In /service/ydim/run specified ruby18 using exec sudo -u apache /usr/bin/ruby18 -rubygems /usr/bin/ydimd
  • Trying to execute sudo -u apache /usr/bin/ruby18 -rubygems /usr/bin/ydimd manually to catch missing gems
  • /usr/bin/gem18 install fastthread (1.0.7 is the same version as on thinpower)
  • /usr/bin/gem18 install ydim. Installs 1.0.0 but /usr/bin/gem18 list ydim on thinpower does not show it.
  • but on thinpower /usr/bin/ydimd links to /home/ywesee/git/ydim/bin/ydimd
  • But now I have problems with rrba/server.rb, for which I cannot find any gem. The error thrown is
/usr/lib64/ruby/site_ruby/1.8/rubygems/core_ext/kernel_require.rb:53:in `gem_original_require': no such file to load -- rrba/server (LoadError)
        from /usr/lib64/ruby/site_ruby/1.8/rubygems/core_ext/kernel_require.rb:53:in `require'
        from /home/niklaus/ydim/lib/ydim/server.rb:9
        from /usr/lib64/ruby/site_ruby/1.8/rubygems/core_ext/kernel_require.rb:53:in `gem_original_require'
        from /usr/lib64/ruby/site_ruby/1.8/rubygems/core_ext/kernel_require.rb:53:in `require'
        from /usr/bin/ydimd:9

Okay. I found a rrba ruby gem. Now it complains about a missing pdfinvoice/config.

But the pdfinvoice is another small SCM. But it looks like we never generated a pdfinvoice gem.

Added the few pdfinvoice files to my local copy of ydim. But it looks like pdf-writer (which is used by pdfinvoice) no longer works under Ruby 2.2.3 as I got the following error

Error: test_to_pdf__debitor_address_1(PdfInvoice::TestInvoice): RuntimeError: Unsupported Image Type
/home/niklaus/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/bundler/gems/pdf-writer-7f5bc6c9ce69/lib/pdf/writer/graphics.rb:672:in `image'
/opt/src/ydim/lib/pdfinvoice/invoice.rb:58:in `pdf_header'
/opt/src/ydim/lib/pdfinvoice/invoice.rb:26:in `to_pdf'
test/test_pdfinvoice.rb:136:in `test_to_pdf__debitor_address_1'
  • Okay this only works, because there exists an (undocumented) link /usr/lib64/ruby/site_ruby/1.8/pdfinvoice -> /home/ywesee/git/pdfinvoice/lib/pdfinvoice.
  • Replacing this one with a link locally here to the checkout of git clone git://scm.ywesee.com/pdfinvoice/.git.
  • Analogously with ln -s /home/niklaus/ydim/lib/ydim/ /usr/lib64/ruby/site_ruby/1.8/x86_64-linux/
  • gem18 install pdf-writer
  • gem18 install mail
  • Now it chokes because a require 'mail' fails. Which gem is needed mail, rmail, tmail? and in which version?

Can't find a mail version using ls -l /usr/lib64/ruby/site_ruby/1.8/| grep mail on thinpower. After installing the same version of tmail and rmail on thinpower via sudo gem18 install tmail --version=1.2.3.1 and sudo gem18 install rmail --version=1.0.0 I the error

sudo -u apache /usr/bin/ruby18 -rubygems /usr/bin/ydimd
/usr/lib64/ruby/site_ruby/1.8/rubygems/core_ext/kernel_require.rb:53:in `gem_original_require': no such file to load -- encoding/character/utf-8 (LoadError)
        from /usr/lib64/ruby/site_ruby/1.8/rubygems/core_ext/kernel_require.rb:53:in `require'
        from /usr/lib64/ruby/site_ruby/1.8/x86_64-linux/ydim/root_session.rb:5

Trying to install this gem via sudo gem18 install character-encodings --version=0.4.1 results in a compilation error

H -DHAVE_STRING_H -DHAVE_SYS_TYPES_H -DHAVE_WCHAR_H    -fPIC -march=corei7 -O2 -pipe -fno-strict-aliasing  -fPIC  -std=c99 -finline-functions -Wall -Wextra -Wwrite-strings -Waggregate-return -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wundef -Wpointer-arith -Wcast-align -Werror -Winline  -c rb_utf_tr.c
rb_utf_tr.c: In Funktion »tr_trans_do«:
rb_utf_tr.c:107:14: Fehler: Variable »modified« gesetzt, aber nicht verwendet [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
Makefile:153: recipe for target 'rb_utf_tr.o' failed
make: *** [rb_utf_tr.o] Error 1
Gem files will remain installed in /usr/local/lib64/ruby/gems/1.8/gems/character-encodings-0.4.1 for inspection.
Results logged to /usr/local/lib64/ruby/gems/1.8/gems/character-encodings-0.4.1/ext/encoding/character/utf-8/gem_make.out

This is a known problem. See http://dev.ywesee.com/Gem/CharacterEncodings. Fixed with

  • sudo gem18 install rkj-character-encodings

Now I finally get the error about the missing database! Using spql -U postgres --h localhost entered create database ydim encoding 'utf8' template template0;, create user ydim with UNENCRYPTED password 'ydimTest'; and grant all privileges on database ydim to ydim ;

Now ydim starts nicely and outputs

sudo -u apache /usr/bin/ruby18 -rubygems /usr/bin/ydimd
HINWEIS:  CREATE TABLE / PRIMARY KEY erstellt implizit einen Index &#65533;object_pkey&#65533; f&#65533;r Tabelle &#65533;object&#65533;
HINWEIS:  CREATE TABLE / UNIQUE erstellt implizit einen Index &#65533;object_name_key&#65533; f&#65533;r Tabelle &#65533;object&#65533;
HINWEIS:  CREATE TABLE / PRIMARY KEY erstellt implizit einen Index &#65533;object_connection_pkey&#65533; f&#65533;r Tabelle &#65533;object_connection&#65533;
HINWEIS:  CREATE TABLE / PRIMARY KEY erstellt implizit einen Index &#65533;collection_pkey&#65533; f&#65533;r Tabelle &#65533;collection&#65533;
I, [2016-04-11T17:09:37.832037 #12874]  INFO -- AutoInvoicer: next run Tue Apr 12 01:00:00 2016, sleeping 28222 seconds
I, [2016-04-11T17:09:38.078788 #12874]  INFO -- CurrencyUpdater: next run Tue Apr 12 02:00:00 2016, sleeping 31821 seconds
I, [2016-04-11T17:09:38.079008 #12874]  INFO -- StatusUpdater: next run Tue Apr 12 01:00:00 2016, sleeping 28221 seconds
I, [2016-04-11T17:09:38.079661 #12874]  INFO -- start: starting ydim-server on druby://localhost:12375

Now preparing ydim-html with sudo -u apache git clone https://github.com/zdavatz/ydim-html /var/www/ydim.ywesee.com. Adding a HTTP-only virtual host (avoids problem with certificate). Added ydim.oddb-ci2.dyndns.org in the /etc/hosts, and restarted Apache. Get the default greetings from apache not the ydim login.

Now when I try to start ydim-html directly on the command line I get the following error

sudo -u apache /usr/bin/ruby -I lib bin/ydim-htmld
 /v/w/ydim.ywesee.com> sudo -u apache /usr/bin/ruby  -rubygems -I lib bin/ydim-htmld
/usr/lib64/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:53:in `require': cannot load such file -- ydim/server (LoadError)
        from /usr/lib64/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:53:in `require'
        from bin/ydim-htmld:10:in `<main>'

Will continue tomorrow.

view · edit · sidebar · attach · print · history
Page last modified on April 11, 2016, at 06:34 PM