view · edit · sidebar · attach · print · history

20120508-update-swissmedic-ydocx-setup-bbmb.ch

<< | Index | >>


Summary

  • Updated ydocx for fachinfo/patinfo format
    • registration number directory support
    • fixed image problem in windows.(use relative path)

Commits

ydocx
oddb.org

Index


Install VirtualBox

Installed to check problems at Windows/IE.

$ virtualbox
VirtualBox: supR3HardenedMainGetTrustedMain: dlopen("/opt/VirtualBox/VirtualBox.so",) failed: libSDL-1.2.so.0: cannot open shared object file: No such file or directory
$ ldd /opt/VirtualBox/VirtualBox.so 
...
    libQtOpenGLVBox.so.4 => /opt/VirtualBox/libQtOpenGLVBox.so.4 (0xb57d1000)
    libSDL-1.2.so.0 => not found
    libstdc++.so.6 => /usr/lib/gcc/i686-pc-linux-gnu/4.5.3/libstdc++.so.6 (0xb56e3000)
...

emerged libsdl

*  media-libs/libsdl
      Latest version available: 1.2.15-r1
      Latest version installed: [ Not Installed ]
      Size of files: 3,828 kB
      Homepage:      http://www.libsdl.org/
      Description:   Simple Direct Media Layer
      License:       LGPL-2.1

Update ydocx


Setup bbmb

  • read Guide.txt
  • $ sudo gem18 install ruby-json
  • create httpd.conf for bbmb.yasuhiro.org
  • copy/edit config.yml
  • create db (`createdb -E UTF8 -T template0 bbmb`, `createuser bbmb`)
  • run with
$ ruby18 -rrubygems bin/bbmbd config="config.yml"

gems

I got some errors for gem installation.

character-encodings

$ ruby18 -rrubygems bin/bbmbd config="config.yml"
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- encoding/character/utf-8 (LoadError)
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /var/www/sandoz.bbmb.ch/lib/bbmb/html/state/global.rb:6
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /var/www/sandoz.bbmb.ch/lib/bbmb/html/state/info.rb:4
...
$ gem18 search character-encoding --remote

*** REMOTE GEMS ***

character-encodings (0.4.1 ruby)

Refs

installed via ruby 1.8.7
  • hbricot 0.8.6
  • ydim 1.0.0
$ ruby18 -rrubygems bin/bbmbd config="config.yml"
/usr/lib/ruby/gems/1.8/gems/htmlgrid-1.0.5/lib/htmlgrid/grid.rb:28: warning: already initialized constant VERSION
could not find htmlgrid.so, falling back to pure-ruby class
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /var/www/sandoz.bbmb.ch/lib/bbmb/util/polling_manager.rb:48: undefined (?...) sequence: /name=(?:(?:(?<quote>['"])(?:=\?.+?\?[QB]\?)?(?<file>.*?)(\?=)?(?<!\\)\k<quote>)|(?:(?<file>.+?)(?:;|$)))/ (SyntaxError)
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require

I switched ruby-1.8.6 with Oniguruma patch

bbmb and sandoz.bbmb.ch

$ ~/usr/local/bin/ruby18 -rrubygems bin/bbmbd config="config.yml"
/home/yasu/usr/local/lib/ruby/gems/1.8/gems/htmlgrid-1.0.5/lib/htmlgrid/grid.rb:28: warning: already initialized constant VERSION
could not find htmlgrid.so, falling back to pure-ruby class
/home/yasu/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- bbmb/sandoz (LoadError)
        from /home/yasu/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from bin/bbmbd:16
        from bin/bbmbd:15:in `each'
        from bin/bbmbd:15

commented out in config.yml

load_files:
#- 'bbmb/sandoz'
 - 'bbmb/util/csv_importer'

copied from sandoz.bbmb.ch project.

$ cp ../sandoz.bbmb.ch/lib/bbmb/util/csv_importer.rb lib/bbmb/util/

Postgres driver problem

 $ ~/usr/local/bin/ruby18 -rrubygems bin/bbmbd config="etc/config.yml"
/home/yasu/usr/local/lib/ruby/gems/1.8/gems/htmlgrid-1.0.5/lib/htmlgrid/grid.rb:28: warning: already initialized constant VERSION
could not find htmlgrid.so, falling back to pure-ruby class
/home/yasu/usr/local/lib/ruby/gems/1.8/gems/dbi-0.4.5/lib/dbi.rb:300:in `load_driver': Unable to load driver 'pg' (underlying error: wrong constant name pg) (DBI::InterfaceError)
...

pg -> Pg
/var/www/bbmb.ch/lib/bbmb/persistence/odba.rb

 ODBA.storage.dbi = ODBA::ConnectionPool.new("DBI:Pg:#{@config.db_name}",
  #ODBA.storage.dbi = ODBA::ConnectionPool.new("DBI:pg:#{@config.db_name}",
                                             @config.db_user, @config.db_auth)
...

bbmb works

...
/home/yasu/usr/local/lib/ruby/1.8/pp.rb:214: command not found: cg-object-id
bin/bbmbd:35: warning: already initialized constant VERSION
D, [2012-05-08T18:02:20.894339 #2394] DEBUG -- updater: sleeping 17859.11 seconds
D, [2012-05-08T18:02:20.894655 #2394] DEBUG -- invoicer: sleeping 2008659.11 seconds
I, [2012-05-08T18:02:20.895073 #2394]  INFO -- start: starting bbmb-server on druby://localhost:12000
...

Refs


Setting UI

/var/www/bbmb.ch 842(master) $ cp -r ../sandoz.bbmb.ch/doc .

restart apach with compiled mod_ruby with ruby 1.8.6.

 [Tue May 08 18:29:03 2012] [notice] Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/1.0.0e mod_ruby/1.3.0 Ruby/1.8.6(2009-06-08) configured -- resuming     normal operations
view · edit · sidebar · attach · print · history
Page last modified on June 12, 2013, at 10:28 AM