Attacking the problem with missing Header/Logo in PDFs (eg. invoice 12438, Grünenthal). The following errors must be corrected:
Working on a unit test for generating the PDF. Added a copy of thinpowers /etc/pdfinvoice/config.yml to ydim/test/data and using it for an example PDF. Most problems were solved after adding a correct config.yml. Had to be changed to UTF-8. Some "'" had to be added, too, to avoid errors parsing the yaml file, e.g. currency: '%1.2f'
.
Now must find the reason, why the Logo is not displayed. Okay. The Logo was missing, too. Changed the default value of creditor_address to Please set creditor_address etc in: ["$HOME/.pdfinvoice/config.yml", "/etc/pdfinvoice/config.yml"]
to made a missing yml self explaining.
Now the invoice displays correctly with Umlaut, Logo, correct address and german texts.
Starting updating ydim and ydim-html on thinpower. First installing most uptodate Ruby version 2.3.1 via Attach:gen_ruby_231.txt.
Ultimately the Gemfile of ruby-dbi, odba, ydim, pdf-writer and ydim-html must have their references to https://github.com/ngiger having changed to https://github.com/zdavatz. I will leave however for later, once everything is running fine. The following steps are required.
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
exec sudo -u apache ruby -rubygems /usr/bin/ydimd
by cd /home/ywesee/git/ydim && exec sudo -u apache /usr/local/bin/bundle exec bin/ydimd
exec sudo -u apache ruby -rubygems /usr/bin/ydimd-html
by cd /var/www/ydim.ywesee.com && exec sudo -u apache /usr/local/bin/bundle exec bin/ydim-htmld
Got the following problem when running sudo -u apache /usr/local/bin/bundle exec bin/migrate_to_utf_8
2016-05-09 12:13:50 +0200: Loading bin/migrate_to_utf_8 /home/ywesee/git/ydim/vendor/ruby/2.3.0/gems/needle-1.3.0/lib/needle/definition-context.rb:36: warning: undefining `initialize' may cause serious problems /home/ywesee/git/ydim/vendor/ruby/2.3.0/gems/needle-1.3.0/lib/needle/definition-context.rb:36: warning: undefining `object_id' may cause serious problems /home/ywesee/git/ydim/vendor/ruby/2.3.0/gems/needle-1.3.0/lib/needle/definition-context.rb:36: warning: undefining `__send__' may cause serious problems bundler: failed to load command: bin/migrate_to_utf_8 (bin/migrate_to_utf_8) Psych::SyntaxError: (<unknown>): Invalid leading UTF-8 octet at line 1 column 1 /usr/local/lib/ruby/2.3.0/psych.rb:377:in `parse' /usr/local/lib/ruby/2.3.0/psych.rb:377:in `parse_stream' /usr/local/lib/ruby/2.3.0/psych.rb:325:in `parse' /usr/local/lib/ruby/2.3.0/psych.rb:252:in `load' /home/ywesee/git/ydim/vendor/ruby/2.3.0/gems/rclconf-1.0.0/lib/rclconf/rclconf.rb:31:in `load' /home/ywesee/git/ydim/vendor/ruby/2.3.0/gems/rclconf-1.0.0/lib/rclconf/rclconf.rb:24:in `block in load' /home/ywesee/git/ydim/vendor/ruby/2.3.0/gems/rclconf-1.0.0/lib/rclconf/rclconf.rb:22:in `each' /home/ywesee/git/ydim/vendor/ruby/2.3.0/gems/rclconf-1.0.0/lib/rclconf/rclconf.rb:22:in `load' /home/ywesee/git/ydim/lib/ydim/server.rb:64:in `<class:Server>' /home/ywesee/git/ydim/lib/ydim/server.rb:20:in `<module:YDIM>' /home/ywesee/git/ydim/lib/ydim/server.rb:19:in `<top (required)>' /home/ywesee/git/ydim/lib/ydim/invoice.rb:9:in `require' /home/ywesee/git/ydim/lib/ydim/invoice.rb:9:in `<top (required)>' /home/ywesee/git/ydim/lib/ydim/factory.rb:6:in `require' /home/ywesee/git/ydim/lib/ydim/factory.rb:6:in `<top (required)>' bin/migrate_to_utf_8:20:in `require' bin/migrate_to_utf_8:20:in `<top (required)>'
Looks like a yml file has non UTF-8 chars in it. Fixed /etc/ydim/ydimd.yml. Now the migration worked without problems.
Now ydim and ydim-html seem to be running fine as verified by svstat /service/ydim*
. But going to https://ydim.ywesee.com/ the background is white. Looks like the css is not yet loaded correctly.
Changed used locate of ydim-html from /home/ywesee/git/ydim-html to /var/www/ydim.ywesee.com. Moved /var/www/ydim.ywesee.com/etc to /var/www/ydim.ywesee.com/etc.old and copied the etc from /home/ywesee/git/ydim-html to /var/www/ydim.ywesee.com. Now ydim-html starts correctly and a the ydim.css is used (yellow background). See
Fixed the link to the commit-id with Fixed commit-link
Looking why I cannot restart oddb.org on my machine.
Zeno wants and installation without bundler.
But first I must build the modified (ruby-dbi, odba, pdf-writer gems locally, as they are not available via rubygems. Created script Attach:install_ydim_html.txt to build and instal neede gems. Changed in /service/ydim*/run bundle
by ruby231
. Also replaced the shebang line for /home/ywesee/git/ydim/bin/ydimd and /var/www/ydim.ywesee.com/bin/ydim-htmld from #!/usr/bin/env ruby
to #!/usr/bin/env ruby230
No I have no more complaints about not being able to connect to DRB-process 12375 (ydim). But after entering an invalid username/password combination, I don't see any log output in /service/ydim-html/log/main/current, /service/ydim/log/main/current nor /var/www/ydim.ywesee.com/log/error_log. But in the errorlog one sees somebody trying to access a non existent index.php from a different IP [Mon May 09 18:08:05 2016] [error] [client 46.165.229.172] script '/var/www/ydim.ywesee.com/doc/index.php' not found or unable to stat
Found the corresponding MD5 for my xxx password like this
grep -B1 -A1 f561aaf6ef0bf14d4208bb46a4ccb3ad /etc/*/*yml /var/www/*/etc/*yml /var/www/ydim.ywesee.com/etc/ydim-htmld.yml-email: ngiger@ywesee.com /var/www/ydim.ywesee.com/etc/ydim-htmld.yml:md5_pass: 'f561aaf6ef0bf14d4208bb46a4ccb3ad' /var/www/ydim.ywesee.com/etc/ydim-htmld.yml-root_key: '/etc/ydim/id_dsa' -- /var/www/ydim.ywesee.com/etc/ydim.yml-email: ngiger@ywesee.com /var/www/ydim.ywesee.com/etc/ydim.yml:md5_pass: 'f561aaf6ef0bf14d4208bb46a4ccb3ad' /var/www/ydim.ywesee.com/etc/ydim.yml-root_key: '/etc/ydim/id_dsa'