view · edit · sidebar · attach · print · history




  • Fix UTF-8 problem in virbac
  • Port virbac to use Rack
  • Keep in Mind
    • To fix in BBMB/SBSM/virbac. Tests for viral states, et al.



Fix UTF-8 problem in virbac

After importing a UTF-8 based CSV file some entries are displayed with funny characters e.g Ergänzungsfuttermittel.

Breaking in the method link of lib/bbmb/html/view/catalogue.rb shows that the category is effectly "Ergänzungsfuttermittel"

The import problem was easy to fix. But I remarked that the imported ABSCHLUSS.CSV is not a correctly UTF-8 encoded file. Eg. I found the line 705878,"K▄TTEL","Oey","300270","Cobiotic N 6x100 ml","01.01.2017","31.12.2017",30,0,30,92.70

Pushed commit Handle CSV files with different encodings

Port virbac to use Rack

Starting work to use new Rack-based SBSM version. Change virbac and virbac-yus services to use Ruby 2.4.0. This seems to work without any problem.

Pushed a tag before_rack to easen following the changes. Virbac is quite different from davaz, as we use here viral states. Must create an Rack app. I am able to start it with bundle exec rackup after having add lib/bbmb/util/app.rb and a few items for logging and yus in my local lib/bbmb/config.rb.

Must understand the errors shown now in log/2017/02/24/app_log. Adapted service to use rack.Added a host to /etc/hosts and created an apache config. Analysing the error [14545:14545:0224/] Invalid entry with unique id: 1916 seen in /var/www/ after visiting Added the apache config as etc/samples/

Fixed loading of config file. Adding a log entry to see, which config file was loaded. Tried to set the cookie-name to 'virbac.bbmb'. This did not work. Looks like the viral states are not visited. After adding the parameter session_class: BBMB::Html::Util::Session, for the RackInterface the viral states begins to thow errors.

Okay. It looks like that I have to add the functionality of bbmb/bin/bbmbd to my Rack app.

Now I am having problems restoring from the ODBA. Backtrace is

/var/www/ `load': undefined class/module Encoding::Character:: (ArgumentError)
        from /var/www/ `load'
        from /var/www/ `restore'
        from /var/www/ `block in fetch_or_restore'
        from /var/www/ `fetch_or_do'
        from /var/www/ `fetch_or_restore'
        from /var/www/ `block in bulk_restore'
        from /var/www/ `each'
        from /var/www/ `bulk_restore'
        from /var/www/ `prefetch'
        from /home/niklaus/git/bbmb/lib/bbmb/persistence/odba.rb:42:in `<module:BBMB>'
        from /home/niklaus/git/bbmb/lib/bbmb/persistence/odba.rb:14:in `<top (required)>'
        from /var/www/ `require'
        from /var/www/ `old_bbmbd'
        from /var/www/ `initialize'
        from /var/www/ `new'

This is a problem because the BBMB server still uses the sbsm/drbserver, which is no longer present in the newer SBSM version. Added it. Now I see the (expected) FEHLER: Relation »target_id_bbmb_model_product_ean13« existiert bereits for all.

Porting bbmb to use SBSM with rack. Updated Gemfile, etc. Most stuff was easy. But the only remaining error puzzles me.

  1) Error:
NoMethodError: undefined method `async' for #<BBMB::Util::App:0x0055e1393df228>
    /home/niklaus/git/bbmb/lib/bbmb/util/server.rb:59:in `inject_order'
    /home/niklaus/git/bbmb/test/util/test_server.rb:99:in `test_inject_order__customer_by_ean13'

Now the unit tests complete. Pushing to branch with_rack Updated to use SBSM with rack >= 1.3.6. incomplete and Added async. Still many failing unit test

view · edit · sidebar · attach · print · history
Page last modified on February 24, 2017, at 05:06 PM