view · edit · sidebar · attach · print · history

20111006-ruby193-oddb

<< | Index | >>


  1. Setup oddb.org on Ruby 1.9.3
  2. Understand Rockit
  3. Setup oddb.org on Ruby 1.9.3 (again)

Goal/Estimate/Evaluation
  • Set up oddb.org on Ruby 1.9.3 / 80% / 70%
Milestones
  1. Setup gems for oddb.org on Ruby 1.9.3
  2. Resolve rockit problem (calc pointer, calc size)
Summary

Setup oddb.org on Ruby 1.9.3

gem list

masa@masa ~/ywesee/oddb.org $ ruby193 /usr/bin/gem list

*** LOCAL GEMS ***

bigdecimal (1.1.0)
dbd-pg (0.3.9)
dbi (0.4.5)
deprecated (2.0.1)
gd2 (1.1.1)
htmlgrid (1.0.0)
io-console (0.3)
json (1.5.4)
minitest (2.5.1)
odba (1.0.0)
pg (0.11.0)
rake (0.9.2.2)
rclconf (1.0.0)
rdoc (3.9.4)
rockit (0.7.2)
sbsm (1.0.0)
turing (0.0.11)
ydim (1.0.0)

Run

masa@masa ~/ywesee/oddb.org $ ruby193  bin/oddbd 
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/deprecated-2.0.1/lib/deprecated.rb:199: warning: already initialized constant Deprecate
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/gd2-1.1.1/lib/gd2.rb:30: Use RbConfig instead of obsolete and deprecated Config.
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
could not find htmlgrid.so, falling back to pure-ruby class
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': /home/masa/rubylib/rockit/token.rb:138: invalid multibyte char (US-ASCII) (SyntaxError)
/home/masa/rubylib/rockit/token.rb:138: syntax error, unexpected '~', expecting ')'
    super("EOF", "&#65533;~~&#65533;&#65533;~^^~" + rand(1e10).inspect)
                    ^
/home/masa/rubylib/rockit/token.rb:138: invalid multibyte char (US-ASCII)
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/rubylib/rockit/grammar.rb:1:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/rubylib/rockit/lalr_parsetable_generator.rb:1:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/rubylib/rockit/rockit.rb:2:in `<top (required)>'
...

Note

  • This is an encoding problem about the old rockit library
  • The rockit version is 0.3.8
  • The latest rockit gem version is 0.7.2
  • Remove the path to the old rockit library
masa@masa ~/ywesee/oddb.org $ unset RUBYLIB

Run

masa@masa ~/ywesee/oddb.org $ ruby193 bin/oddbd 
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/deprecated-2.0.1/lib/deprecated.rb:199: warning: already initialized constant Deprecate
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/gd2-1.1.1/lib/gd2.rb:30: Use RbConfig instead of obsolete and deprecated Config.
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
could not find htmlgrid.so, falling back to pure-ruby class
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- rockit/rockit (LoadError)
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/ywesee/oddb.org/src/util/persistence.rb:5:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/ywesee/oddb.org/src/model/user.rb:7:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/ywesee/oddb.org/src/view/personal.rb:5:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/ywesee/oddb.org/src/view/logohead.rb:8:in `<top (required)>'
...
  • check rockit in oddb.org
masa@masa ~/ywesee/oddb.org $ grep -r rockit src/
src/model/part.rb:require 'rockit/rockit'
src/plugin/vaccines.rb:require 'rockit/rockit'
src/util/persistence.rb:require 'rockit/rockit'
  • rockit/token.rb
# encoding: ascii-8bit
  • rockit/rockit_grammars_parser.rb
# encoding: ascii-8bit

Run

masa@masa ~/ywesee/oddb.org $ ruby193 bin/oddbd 
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/deprecated-2.0.1/lib/deprecated.rb:199: warning: already initialized constant Deprecate
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/gd2-1.1.1/lib/gd2.rb:30: Use RbConfig instead of obsolete and deprecated Config.
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
could not find htmlgrid.so, falling back to pure-ruby class
/home/masa/rubylib/rockit/grammar.rb:82:in `make_element': cannot make an element from nil (ArgumentError)
        from /home/masa/rubylib/rockit/grammar.rb:92:in `block in make_elements'
        from /home/masa/rubylib/rockit/grammar.rb:92:in `map'
        from /home/masa/rubylib/rockit/grammar.rb:92:in `make_elements'
        from /home/masa/rubylib/rockit/grammar.rb:361:in `initialize'
        from /home/masa/rubylib/rockit/grammar.rb:484:in `new'
        from /home/masa/rubylib/rockit/grammar.rb:484:in `prod'
        from /home/masa/rubylib/rockit/rockit_grammar_ast_eval.rb:134:in `block in eval_ast'
        from /home/masa/rubylib/rockit/syntax_tree.rb:337:in `map'
        from /home/masa/rubylib/rockit/syntax_tree.rb:337:in `rescue in method_missing'
        from /home/masa/rubylib/rockit/syntax_tree.rb:333:in `method_missing'
        from /home/masa/rubylib/rockit/rockit_grammar_ast_eval.rb:132:in `eval_ast'
        from /home/masa/rubylib/rockit/rockit_grammar_ast_eval.rb:129:in `block in eval_ast'
        from /home/masa/rubylib/rockit/syntax_tree.rb:337:in `map'
        from /home/masa/rubylib/rockit/syntax_tree.rb:337:in `rescue in method_missing'
        from /home/masa/rubylib/rockit/syntax_tree.rb:333:in `method_missing'
        from /home/masa/rubylib/rockit/rockit_grammar_ast_eval.rb:129:in `eval_ast'
        from /home/masa/rubylib/rockit/rockit_grammar_ast_eval.rb:115:in `rockit_productions_eval'
        from /home/masa/rubylib/rockit/rockit_grammar_ast_eval.rb:180:in `rockit_grammar_eval'
        from /home/masa/rubylib/rockit/rockit.rb:26:in `generate_parser'
...

Understand Rockit

git clone

masa@masa ~/work $ git clone https://github.com/robertfeldt/rockit.git

Note

  1. rockit is used to create 'Pointer' to point an object in the ODBA cache (src/util/persistence.rb)
  2. rockit is also used to calculate 'size' of model (src/model/part.rb)

Comment out (temporary) 'rockit' process

  • src/util/persistence.rb
    class Pointer
=begin
      @parser = Parse.generate_parser <<-EOG
Grammar OddbSize
  Tokens
    STEP = /!/u
    ARG  = /,/u
    PTR  = /:/u
    PEND = /\\./u
    EXPR = /([^!,:.%]|%[!,:.%])+/u
  Productions
    Pointer -> PTR Step* PEND?
               [: _, steps, _]
    Step    -> STEP EXPR Arg* 
               [: _, command, arguments]
    Arg     -> ARG (EXPR | Pointer)
               [: _, argument]
      EOG
=end
      class << self
        def parse(string)
=begin
p "getin parse"
p string
          ast = @parser.parse(string)
          ast.compact!
          produce_pointer(ast)
=end
      'pointer'
        end

  • src/model/part.rb
module ODDB
  module SizeParser
=begin
    @@parser = Parse.generate_parser <<-EOG
Grammar OddbSize
  Tokens
    DESCRIPTION = /(?!#{unit_pattern}\s)#{iso_pattern}(\s+#{iso_pattern})*/u
    NUMERIC     = /#{numeric_pattern}/u
    SPACE       = /\s+/u [:Skip]
    UNIT        = /#{unit_pattern}/u
  Productions
    Size      ->  Multiple* Addition? Count? Measure? Scale? Dose? DESCRIPTION?
    Count     ->  'je'? NUMERIC
    Multiple  ->  NUMERIC UNIT? /[xXà]|Set/u
    Measure   ->  NUMERIC UNIT UNIT?
    Addition  ->  NUMERIC UNIT? '+'
    Scale     ->  '/' NUMERIC? UNIT
    Dose      ->  '(' NUMERIC UNIT ')'
    EOG
=end
    def parse_size(size)
      multi, addition, count, measure, scale, dose, comform = nil
=begin
      begin
        ast = @@parser.parse(size)
        multi, addition, count, measure, scale, dose, comform = ast.flatten
        count = (count ? count[1].value.to_i : 1)
      rescue ParseException, AmbigousParseException => e
=end
        count = size.to_i
#      end
...

Setup oddb.org on Ruby 1.9.3 (again)

  • install yus (1.0.0)
  • install mechanize (2.0.1)
masa@masa ~/ywesee/oddb.org $ ruby193 /usr/bin/gem install mechanize
Fetching: nokogiri-1.5.0.gem (100%)
Building native extensions.  This could take a while...
Fetching: net-http-persistent-1.9.gem (100%)
Fetching: net-http-digest_auth-1.1.1.gem (100%)
Fetching: webrobots-0.0.12.gem (100%)
Fetching: mechanize-2.0.1.gem (100%)
Successfully installed nokogiri-1.5.0
Successfully installed net-http-persistent-1.9
Successfully installed net-http-digest_auth-1.1.1
Successfully installed webrobots-0.0.12
Successfully installed mechanize-2.0.1
5 gems installed
Installing ri documentation for nokogiri-1.5.0...
Installing ri documentation for net-http-persistent-1.9...
Installing ri documentation for net-http-digest_auth-1.1.1...
Installing ri documentation for webrobots-0.0.12...
Installing ri documentation for mechanize-2.0.1...
Installing RDoc documentation for nokogiri-1.5.0...
Installing RDoc documentation for net-http-persistent-1.9...
Installing RDoc documentation for net-http-digest_auth-1.1.1...
Installing RDoc documentation for webrobots-0.0.12...
Installing RDoc documentation for mechanize-2.0.1...

Note

  • The other gems are also installed
    1. nokogiri-1.5.0
    2. net-http-persistent-1.9
    3. net-http-digest_auth-1.1.1
    4. webrobots-0.0.12
  • install hpricot (0.8.4)

Run

masa@masa ~/ywesee/oddb.org $ ruby193 bin/oddbd 
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/deprecated-2.0.1/lib/deprecated.rb:199: warning: already initialized constant Deprecate
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/gd2-1.1.1/lib/gd2.rb:30: Use RbConfig instead of obsolete and deprecated Config.
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
could not find htmlgrid.so, falling back to pure-ruby class
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': /home/masa/ywesee/oddb.org/src/model/text.rb:138: invalid multibyte char (US-ASCII) (SyntaxError)
/home/masa/ywesee/oddb.org/src/model/text.rb:138: invalid multibyte char (US-ASCII)
/home/masa/ywesee/oddb.org/src/model/text.rb:138: syntax error, unexpected $end, expecting ')'
           && /[&#8208;­-]\s*$/u.match(@raw_txt) &...
                  ^
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/ywesee/oddb.org/src/model/analysis/permission.rb:6:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/ywesee/oddb.org/src/model/analysis/position.rb:8:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/ywesee/oddb.org/ext/analysisparse/src/analysis_hpricot.rb:5:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/ywesee/oddb.org/src/plugin/analysis.rb:7:in `<top (required)>'
...
  • src/model/text.rb
# encoding: utf-8

Run

masa@masa ~/ywesee/oddb.org $ ruby193 bin/oddbd 
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/deprecated-2.0.1/lib/deprecated.rb:199: warning: already initialized constant Deprecate
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/gd2-1.1.1/lib/gd2.rb:30: Use RbConfig instead of obsolete and deprecated Config.
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
could not find htmlgrid.so, falling back to pure-ruby class
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- encoding/character/utf-8 (LoadError)
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/ywesee/oddb.org/src/model/text.rb:8:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/ywesee/oddb.org/src/model/analysis/permission.rb:6:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
...
  • install character-encodings (0.4.1)
masa@masa ~/ywesee/oddb.org $ ruby193 /usr/bin/gem install character-encodings
Fetching: character-encodings-0.4.1.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing character-encodings:
        ERROR: Failed to build gem native extension.

        /home/masa/bin/ruby193rc1/bin/ruby extconf.rb
extconf.rb:4: invalid multibyte char (US-ASCII)
extconf.rb:4: invalid multibyte char (US-ASCII)
extconf.rb:4: syntax error, unexpected $end, expecting keyword_end
  checking_for "‘#{opt}’ option to compiler" do
                  ^


Gem files will remain installed in /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/character-encodings-0.4.1 for inspection.
Results logged to /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/character-encodings-0.4.1/ext/encoding/character/utf-8/gem_make.out
  • comment out charactor-encodings (src/model/text.rb)
#require 'encoding/character/utf-8'

Run

masa@masa ~/ywesee/oddb.org $ ruby193 bin/oddbd 
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/deprecated-2.0.1/lib/deprecated.rb:199: warning: already initialized constant Deprecate
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/gd2-1.1.1/lib/gd2.rb:30: Use RbConfig instead of obsolete and deprecated Config.
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
could not find htmlgrid.so, falling back to pure-ruby class
racc/parser.rb:33: warning: already initialized constant Racc_Runtime_Version
racc/parser.rb:34: warning: already initialized constant Racc_Runtime_Revision
racc/parser.rb:36: warning: already initialized constant Racc_Runtime_Core_Version_R
racc/parser.rb:37: warning: already initialized constant Racc_Runtime_Core_Revision_R
racc/parser.rb:41: warning: already initialized constant Racc_Runtime_Core_Revision_C
racc/parser.rb:49: warning: already initialized constant Racc_Main_Parsing_Routine
racc/parser.rb:50: warning: already initialized constant Racc_YY_Parse_Method
racc/parser.rb:51: warning: already initialized constant Racc_Runtime_Core_Version
racc/parser.rb:52: warning: already initialized constant Racc_Runtime_Core_Revision
racc/parser.rb:53: warning: already initialized constant Racc_Runtime_Type
/home/masa/ywesee/oddb.org/src/util/quanty/parse.rb:471:in `module_eval': parse.y:84: invalid multibyte char (US-ASCII) (SyntaxError)
parse.y:84: invalid multibyte char (US-ASCII)
parse.y:84: syntax error, unexpected $end, expecting keyword_then or ',' or ';' or '\n'
      when /\A[A-Za-z_µ]+([A-Za-z_µ0-9-]+[A-Za-z_µ])?/ou
                        ^
        from /home/masa/ywesee/oddb.org/src/util/quanty/parse.rb:471:in `<class:Parse>'
        from /home/masa/ywesee/oddb.org/src/util/quanty/parse.rb:469:in `<class:Quanty>'
        from /home/masa/ywesee/oddb.org/src/util/quanty/parse.rb:466:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/ywesee/oddb.org/src/util/quanty.rb:1:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/ywesee/oddb.org/src/model/dose.rb:4:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/ywesee/oddb.org/src/plugin/bsv_xml.rb:10:in `<top (required)>'
...
  • src/util/quanty/parse.rb
# encoding: utf-8

Run

masa@masa ~/ywesee/oddb.org $ ruby193 bin/oddbd 
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/deprecated-2.0.1/lib/deprecated.rb:199: warning: already initialized constant Deprecate
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/gd2-1.1.1/lib/gd2.rb:30: Use RbConfig instead of obsolete and deprecated Config.
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
could not find htmlgrid.so, falling back to pure-ruby class
racc/parser.rb:33: warning: already initialized constant Racc_Runtime_Version
racc/parser.rb:34: warning: already initialized constant Racc_Runtime_Revision
racc/parser.rb:36: warning: already initialized constant Racc_Runtime_Core_Version_R
racc/parser.rb:37: warning: already initialized constant Racc_Runtime_Core_Revision_R
racc/parser.rb:41: warning: already initialized constant Racc_Runtime_Core_Revision_C
racc/parser.rb:49: warning: already initialized constant Racc_Main_Parsing_Routine
racc/parser.rb:50: warning: already initialized constant Racc_YY_Parse_Method
racc/parser.rb:51: warning: already initialized constant Racc_Runtime_Core_Version
racc/parser.rb:52: warning: already initialized constant Racc_Runtime_Core_Revision
racc/parser.rb:53: warning: already initialized constant Racc_Runtime_Type
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': /home/masa/ywesee/oddb.org/src/util/quanty/fact.rb:65: invalid multibyte char (US-ASCII) (SyntaxError)
/home/masa/ywesee/oddb.org/src/util/quanty/fact.rb:65: invalid multibyte char (US-ASCII)
/home/masa/ywesee/oddb.org/src/util/quanty/fact.rb:65: syntax error, unexpected $end, expecting keyword_then or ';' or '\n'
      if /^([µA-Za-z_]+([A-Za-z_0-9-]+[A-Za...
               ^
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/ywesee/oddb.org/src/util/quanty.rb:2:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/ywesee/oddb.org/src/model/dose.rb:4:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/ywesee/oddb.org/src/plugin/bsv_xml.rb:10:in `<top (required)>'
...
  • src/util/quanty/fact.rb
# encoding: utf-8
  • install rubyzip (0.9.4)
  • install savon (0.9.7)
masa@masa ~/ywesee/oddb.org $ ruby193 /usr/bin/gem install savon
Fetching: builder-3.0.0.gem (100%)
Fetching: nori-1.0.2.gem (100%)
Fetching: rack-1.3.4.gem (100%)
Fetching: httpi-0.9.5.gem (100%)
Fetching: wasabi-2.0.0.gem (100%)
Fetching: gyoku-0.4.4.gem (100%)
Fetching: akami-1.0.0.gem (100%)
Fetching: savon-0.9.7.gem (100%)
Successfully installed builder-3.0.0
Successfully installed nori-1.0.2
Successfully installed rack-1.3.4
Successfully installed httpi-0.9.5
Successfully installed wasabi-2.0.0
Successfully installed gyoku-0.4.4
Successfully installed akami-1.0.0
Successfully installed savon-0.9.7
8 gems installed
Installing ri documentation for builder-3.0.0...
unable to convert "\xF1" from ASCII-8BIT to UTF-8 for README, skipping
unable to convert "\xF1" from ASCII-8BIT to UTF-8 for README.rdoc, skipping
Installing ri documentation for nori-1.0.2...
Installing ri documentation for rack-1.3.4...
Installing ri documentation for httpi-0.9.5...
Installing ri documentation for wasabi-2.0.0...
Installing ri documentation for gyoku-0.4.4...
Installing ri documentation for akami-1.0.0...
Installing ri documentation for savon-0.9.7...
Installing RDoc documentation for builder-3.0.0...
unable to convert "\xF1" from ASCII-8BIT to UTF-8 for README, skipping
unable to convert "\xF1" from ASCII-8BIT to UTF-8 for README.rdoc, skipping
Installing RDoc documentation for nori-1.0.2...
Installing RDoc documentation for rack-1.3.4...
Installing RDoc documentation for httpi-0.9.5...
Installing RDoc documentation for wasabi-2.0.0...
Installing RDoc documentation for gyoku-0.4.4...
Installing RDoc documentation for akami-1.0.0...
Installing RDoc documentation for savon-0.9.7...

Note

  • The other installed libraries
    1. builder-3.0.0
    2. nori-1.0.2
    3. rack-1.3.4
    4. httpi-0.9.5
    5. wasabi-2.0.0
    6. gyoku-0.4.4
    7. akami-1.0.0

Run

masa@masa ~/ywesee/oddb.org $ ruby193 bin/oddbd 
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/deprecated-2.0.1/lib/deprecated.rb:199: warning: already initialized constant Deprecate
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/gd2-1.1.1/lib/gd2.rb:30: Use RbConfig instead of obsolete and deprecated Config.
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
could not find htmlgrid.so, falling back to pure-ruby class
racc/parser.rb:33: warning: already initialized constant Racc_Runtime_Version
racc/parser.rb:34: warning: already initialized constant Racc_Runtime_Revision
racc/parser.rb:36: warning: already initialized constant Racc_Runtime_Core_Version_R
racc/parser.rb:37: warning: already initialized constant Racc_Runtime_Core_Revision_R
racc/parser.rb:41: warning: already initialized constant Racc_Runtime_Core_Revision_C
racc/parser.rb:49: warning: already initialized constant Racc_Main_Parsing_Routine
racc/parser.rb:50: warning: already initialized constant Racc_YY_Parse_Method
racc/parser.rb:51: warning: already initialized constant Racc_Runtime_Core_Version
racc/parser.rb:52: warning: already initialized constant Racc_Runtime_Core_Revision
racc/parser.rb:53: warning: already initialized constant Racc_Runtime_Type
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': /home/masa/ywesee/oddb.org/src/util/html_parser.rb:152: invalid multibyte char (US-ASCII) (SyntaxError)
/home/masa/ywesee/oddb.org/src/util/html_parser.rb:152: invalid multibyte char (US-ASCII)
/home/masa/ywesee/oddb.org/src/util/html_parser.rb:152: syntax error, unexpected $end, expecting ')'
                        super(data.gsub("\302\222", "’"))
                                                       ^
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/ywesee/oddb.org/ext/meddata/src/session.rb:8:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/ywesee/oddb.org/ext/meddata/src/drbsession.rb:4:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/ywesee/oddb.org/ext/meddata/src/meddata.rb:7:in `<top (required)>'
...
  • src/util/html_parser.rb
 # encoding: utf-8
  • install rmail (1.0.0)
  • src/model/part.rb
 # encoding: utf-8
  • src/plugin/medwin.rb
 # encoding: utf-8

Run

masa@masa ~/ywesee/oddb.org $ ruby193 bin/oddbd 
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/deprecated-2.0.1/lib/deprecated.rb:199: warning: already initialized constant Deprecate
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/gd2-1.1.1/lib/gd2.rb:30: Use RbConfig instead of obsolete and deprecated Config.
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
could not find htmlgrid.so, falling back to pure-ruby class
racc/parser.rb:33: warning: already initialized constant Racc_Runtime_Version
racc/parser.rb:34: warning: already initialized constant Racc_Runtime_Revision
racc/parser.rb:36: warning: already initialized constant Racc_Runtime_Core_Version_R
racc/parser.rb:37: warning: already initialized constant Racc_Runtime_Core_Revision_R
racc/parser.rb:41: warning: already initialized constant Racc_Runtime_Core_Revision_C
racc/parser.rb:49: warning: already initialized constant Racc_Main_Parsing_Routine
racc/parser.rb:50: warning: already initialized constant Racc_YY_Parse_Method
racc/parser.rb:51: warning: already initialized constant Racc_Runtime_Core_Version
racc/parser.rb:52: warning: already initialized constant Racc_Runtime_Core_Revision
racc/parser.rb:53: warning: already initialized constant Racc_Runtime_Type
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/rpdf2txt-0.8.2/lib/rpdf2txt-rockit/token.rb:138: invalid multibyte char (US-ASCII) (SyntaxError)
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/rpdf2txt-0.8.2/lib/rpdf2txt-rockit/token.rb:138: syntax error, unexpected '~', expecting ')'
    super("EOF", "&#65533;~~&#65533;&#65533;~^^~" + rand(1e10).inspect)
                    ^
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/rpdf2txt-0.8.2/lib/rpdf2txt-rockit/token.rb:138: invalid multibyte char (US-ASCII)
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/rpdf2txt-0.8.2/lib/rpdf2txt-rockit/grammar.rb:1:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
...

Note

  • Again rockit error (it is from rpdf2txt-rockit.rb)
  • The rockit library is used in 3 parts of oddb.org
    1. create Pointer
    2. calculate size
    3. in rpdf2txt library
  • rpdf2txt library is required in src/plugin/narcotic.rb
  • ruby193rc1/lib/ruby/gems/1.9.1/gems/rpdf2txt-0.8.2/lib/rpdf2txt-rockit/token.rb
 # encoding: ascii-8bit
  • ruby193rc1/lib/ruby/gems/1.9.1/gems/rpdf2txt-0.8.2/lib/rpdf2txt-rockit/rockit_grammars_parser.rb
 # encoding: ascii-8bit

Run

masa@masa ~/ywesee/oddb.org $ ruby193 bin/oddbd 
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/deprecated-2.0.1/lib/deprecated.rb:199: warning: already initialized constant Deprecate
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/gd2-1.1.1/lib/gd2.rb:30: Use RbConfig instead of obsolete and deprecated Config.
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
could not find htmlgrid.so, falling back to pure-ruby class
racc/parser.rb:33: warning: already initialized constant Racc_Runtime_Version
racc/parser.rb:34: warning: already initialized constant Racc_Runtime_Revision
racc/parser.rb:36: warning: already initialized constant Racc_Runtime_Core_Version_R
racc/parser.rb:37: warning: already initialized constant Racc_Runtime_Core_Revision_R
racc/parser.rb:41: warning: already initialized constant Racc_Runtime_Core_Revision_C
racc/parser.rb:49: warning: already initialized constant Racc_Main_Parsing_Routine
racc/parser.rb:50: warning: already initialized constant Racc_YY_Parse_Method
racc/parser.rb:51: warning: already initialized constant Racc_Runtime_Core_Version
racc/parser.rb:52: warning: already initialized constant Racc_Runtime_Core_Revision
racc/parser.rb:53: warning: already initialized constant Racc_Runtime_Type
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- md5 (LoadError)
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/rpdf2txt-0.8.2/lib/rpdf2txt/object.rb:30:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
...

Note

  • The git latest code of rpdf2txt is different from the gem 0.8.2
  • We should update the rpdf2txt gem
  • ruby193rc1/lib/ruby/gems/1.9.1/gems/rpdf2txt-0.8.2/lib/rpdf2txt/object.rb
 require 'digest/md5'
  • ruby193rc1/lib/ruby/gems/1.9.1/gems/rpdf2txt-0.8.2/lib/rpdf2txt/parser.rb
 # encoding: utf-8
 require 'digest/md5'
  • src/plugin/ouwerkerk.rb
  1. encoding: utf-8
  • install spreadsheet (0.6.5.9)
masa@masa ~/ywesee/oddb.org $ ruby193 /usr/bin/gem install spreadsheet
Fetching: ruby-ole-1.2.11.2.gem (100%)
Fetching: spreadsheet-0.6.5.9.gem (100%)
Successfully installed ruby-ole-1.2.11.2
Successfully installed spreadsheet-0.6.5.9
2 gems installed
Installing ri documentation for ruby-ole-1.2.11.2...
Installing ri documentation for spreadsheet-0.6.5.9...
Installing RDoc documentation for ruby-ole-1.2.11.2...
Installing RDoc documentation for spreadsheet-0.6.5.9...

Note

  • The other installed library
    1. ruby-ole-1.2.11.2
  • src/view/dataformat.rb
 # encoding: utf-8
  • src/plugin/swissmedic.rb
 # encoding: utf-8
  • install swissmedic-diff (0.1.3)
masa@masa ~/work $ git clone ssh://ywesee@scm.ywesee.com/home/ywesee/git/swissmedic-diff
masa@masa ~/work $ cd swissmedic-diff/

masa@masa ~/work/swissmedic-diff $ gem build swissmedic-diff.gemspec

masa@masa ~/work/swissmedic-diff $ unset RUBYOPT

masa@masa ~/work/swissmedic-diff $ ruby193 /usr/bin/gem install swissmedic-diff-0.1.3.gem 
Fetching: parseexcel-0.5.2.gem (100%)
WARNING: parseexcel-0.5.2 has an invalid nil value for @cert_chain
Successfully installed parseexcel-0.5.2
Successfully installed swissmedic-diff-0.1.3
2 gems installed
Installing ri documentation for parseexcel-0.5.2...
unable to convert "\xFC" from ASCII-8BIT to UTF-8 for lib/parseexcel/format.rb, skipping
unable to convert "\xFC" from ASCII-8BIT to UTF-8 for lib/parseexcel/olestorage.rb, skipping
unable to convert "\xFC" from ASCII-8BIT to UTF-8 for lib/parseexcel/parser.rb, skipping
unable to convert "\xFC" from ASCII-8BIT to UTF-8 for lib/parseexcel/workbook.rb, skipping
unable to convert "\xFC" from ASCII-8BIT to UTF-8 for lib/parseexcel/worksheet.rb, skipping
Installing ri documentation for swissmedic-diff-0.1.3...
Installing RDoc documentation for parseexcel-0.5.2...
unable to convert "\xFC" from ASCII-8BIT to UTF-8 for lib/parseexcel/format.rb, skipping
unable to convert "\xFC" from ASCII-8BIT to UTF-8 for lib/parseexcel/olestorage.rb, skipping
unable to convert "\xFC" from ASCII-8BIT to UTF-8 for lib/parseexcel/parser.rb, skipping
unable to convert "\xFC" from ASCII-8BIT to UTF-8 for lib/parseexcel/workbook.rb, skipping
unable to convert "\xFC" from ASCII-8BIT to UTF-8 for lib/parseexcel/worksheet.rb, skipping
Installing RDoc documentation for swissmedic-diff-0.1.3...
  • src/view/rss/fachinfo.rb
 # encoding: utf-8
  • src/view/drugs/fachinfo.rb
 # encoding: utf-8
 class RootFachinfoComposite < View::Drugs::FachinfoComposite
 CHOOSER_CLASS = EditFiChapterChooser
 def init
   unless(@model.company.invoiceable?)
     components.update({
       [0,2] => :invoiceability,
       [0,3] => :document,
     })
     css_map.store([0,3], 'list')
     colspan_map.store([0,3], 2)
   end
   super
 end
  • src/view/chapter.rb
 #require 'encoding/character/utf-8'
  • install tmail (1.2.7.1)
  • src/util/exporter.rb
 # encoding: utf-8
  • install archive-tarsimple (1.1.1)
  • src/view/admin/package.rb
 # encoding: utf-8
  • src/view/admin/assign_patinfo.rb
 # encoding: utf-8

 def compose_footer(matrix)
   super
   btn = HtmlGrid::Button.new(:back, @model, @session, self)
   args = {:pointer => @model.sequence.pointer}
  • require 'digest/md5'
 # encoding: utf-8
  • install gruff (0.3.6)
  • install rmagick (2.13.1)
  • src/util/umlautsort.rb
  • src/view/drugs/minifi.rb
  • src/state/hospitals/hospitallist.rb
  • src/view/hospitals/hospitallist.rb
  • src/view/drugs/csv_result.rb
  • src/state/substances/substances.rb
  • src/util/iso-latin1.rb
  • src/util/notification_logger.rb
 # encoding: utf-8
  • install paypal (2.0.0)
Fetching: i18n-0.6.0.gem (100%)
Fetching: money-3.7.1.gem (100%)
Fetching: paypal-2.0.0.gem (100%)
WARNING: paypal-2.0.0 has an invalid nil value for @cert_chain
Successfully installed i18n-0.6.0
Successfully installed money-3.7.1
Successfully installed paypal-2.0.0
3 gems installed
Installing ri documentation for i18n-0.6.0...
Installing ri documentation for money-3.7.1...
Installing ri documentation for paypal-2.0.0...
Installing RDoc documentation for i18n-0.6.0...
Installing RDoc documentation for money-3.7.1...
Installing RDoc documentation for paypal-2.0.0...

Note

  • The other installed libraries
    1. i18n-0.6.0
    2. money-3.7.1
  • instal activesupport (3.1.0)
masa@masa ~/ywesee/oddb.org $ ruby193 /usr/bin/gem install activesupport
Fetching: multi_json-1.0.3.gem (100%)
Fetching: activesupport-3.1.0.gem (100%)
Successfully installed multi_json-1.0.3
Successfully installed activesupport-3.1.0
2 gems installed
Installing ri documentation for multi_json-1.0.3...
Installing ri documentation for activesupport-3.1.0...
Installing RDoc documentation for multi_json-1.0.3...
Installing RDoc documentation for activesupport-3.1.0...

Note

  • The other installed libraries
    1. multi_json-1.0.3

Run

masa@masa ~/ywesee/oddb.org $ ruby193 bin/oddbd
...
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/paypal-2.0.0/lib/notification.rb:52:in `<class:Notification>': undefined method `cattr_accessor' for Paypal::Notification:Class (NoMethodError)
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/paypal-2.0.0/lib/notification.rb:40:in `<module:Paypal>'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/paypal-2.0.0/lib/notification.rb:3:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/paypal-2.0.0/lib/paypal.rb:30:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
        from /home/masa/ywesee/oddb.org/src/util/oddbapp.rb:27:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from bin/oddbd:9:in `<main>'
  • ruby193rc1/lib/ruby/gems/1.9.1/gems/paypal-2.0.0/lib/notification.rb
 require 'active_support/core_ext/class/attribute_accessors'
  • install facets (1.8.54)
masa@masa ~/ywesee/oddb.org $ ruby193 /usr/bin/gem install facets --version "=1.8.54"
Fetching: facets-1.8.54.gem (100%)
WARNING: facets-1.8.54 has an invalid nil value for @cert_chain
Successfully installed facets-1.8.54
1 gem installed
Installing ri documentation for facets-1.8.54...
Installing RDoc documentation for facets-1.8.54...

Note

  • The latest facets version is 2.9.2

Run

masa@masa ~/ywesee/oddb.org $ ruby193 bin/oddbd 
...
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- oddb/util/m10l_document (LoadError)
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/masa/ywesee/oddb.org/src/remote/migel/model_super.rb:194:in `<top (required)>'
        from /home/masa/bin/ruby193rc1/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
...

Note

  • oddb library is necessary to run

Run

masa@masa ~/ywesee/oddb.org $ ruby193 -I ../oddb/lib bin/oddbd 
...
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/dbd-pg-0.3.9/lib/dbd/pg/statement.rb:62:in `rescue in execute': ERROR:  relation "oddb_persistence_pointer" already exists (DBI::ProgrammingError)
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/dbd-pg-0.3.9/lib/dbd/pg/statement.rb:37:in `execute'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/base_classes/database.rb:96:in `execute'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/base_classes/database.rb:114:in `do'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/handles/database.rb:106:in `do'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/storage.rb:176:in `create_index'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/index.rb:226:in `initialize'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:148:in `new'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:148:in `block in create_index'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/storage.rb:558:in `call'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/storage.rb:558:in `block in transaction'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/handles/database.rb:209:in `transaction'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/connection_pool.rb:36:in `block in method_missing'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/connection_pool.rb:26:in `next_connection'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/connection_pool.rb:35:in `method_missing'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/storage.rb:554:in `transaction'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:520:in `transaction'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:140:in `create_index'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:131:in `block in create_deferred_indices'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:125:in `each'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:125:in `create_deferred_indices'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:437:in `setup'
        from bin/oddbd:30:in `<main>'

Note

        def fetch_all
            sanity_check({:fetchable => true, :prepared => true, :executed => true})

            cols = column_names
            fetched_rows = []

            begin
                while row = fetch do
                    #fetched_rows.push(row)
                    fetched_rows.push(row.to_a)
                end
            rescue Exception
            end

            @handle.cancel
            @fetchable = false

            return fetched_rows
        end

Run

masa@masa ~/ywesee/oddb.org $ ruby193 -I ../oddb/lib bin/oddbd 
...
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/18_19_loading_compatibility.rb:41:in `_load': undefined method `new!' for Date:Class (NoMethodError)
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/marshal.rb:15:in `load'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/marshal.rb:15:in `load'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:588:in `restore'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:313:in `block in fetch_or_restore'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:308:in `call'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:308:in `fetch_or_do'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:312:in `fetch_or_restore'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:299:in `block in fetch_named'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:308:in `call'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:308:in `fetch_or_do'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:291:in `fetch_named'
        from /home/masa/ywesee/oddb.org/src/util/oddbapp.rb:1337:in `initialize'
        from bin/oddbd:33:in `new'
        from bin/oddbd:33:in `<main>'

Comment out 'new!' suspend

  • ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/18_19_loading_compatibility.rb
      #new!(ajd, of, sg)
      new

Run

masa@masa ~/ywesee/oddb.org $ ruby193 -I ../oddb/lib bin/oddbd 
...
init system
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/marshal.rb:15:in `load': undefined class/module CSV::Cell (ArgumentError)
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/marshal.rb:15:in `load'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:234:in `block in fetch_collection'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:233:in `each'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:233:in `fetch_collection'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:592:in `restore'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:313:in `block in fetch_or_restore'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:308:in `call'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:308:in `fetch_or_do'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:312:in `fetch_or_restore'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:600:in `restore_object'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:565:in `load_object'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:221:in `block in fetch'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:308:in `call'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:308:in `fetch_or_do'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb:220:in `fetch'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/stub.rb:49:in `odba_receiver'
        from /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/stub.rb:112:in `method_missing'
        from /home/masa/ywesee/oddb.org/src/util/oddbapp.rb:750:in `rebuild_atc_chooser'
        from /home/masa/ywesee/oddb.org/src/util/oddbapp.rb:96:in `init'
        from /home/masa/ywesee/oddb.org/src/util/oddbapp.rb:1341:in `initialize'
        from bin/oddbd:33:in `new'
        from bin/oddbd:33:in `<main>'

Note

  • CSV::Cell class is removed in Ruby 1.9!!
  • add the Cell old definition in ruby193rc1/lib/ruby/1.9.1/csv.rb
class CSV
  # The version of the installed library.
  VERSION = "2.4.8".freeze

  # deprecated
  class Cell < String
    def initialize(data = "", is_null = false)
      super(is_null ? "" : data)
    end

    def data
      to_s
    end
  end

Run

masa@masa ~/ywesee/oddb.org $ ruby193 -I ../oddb/lib bin/oddbd 
....
init system
ODBA::Stub was unable to replace Hash#27397182 from OddbPrevalence:#2
ODBA::Stub was unable to replace Hash#27397181 from OddbPrevalence:#2
init system: 6.85526914
setup drb-delegation
reset
reset: 6.855549749
system initialized
initialized: 6.855669364

Note

  • It looks running but the top page is not shown (Error message does not come)

Experiment

masa@masa ~/ywesee/oddb.org $ bin/admin
ch.oddb> registrations.length
-> 10468
ch.oddb> ODDB::Package.find_by_pharmacode('223332')
-> #<ODDB::Package:0x0000000cd767f0>
ch.oddb> ODDB::Package.find_by_pharmacode('223332').name
-> Inderal 10 mg, Tabletten
ch.oddb> search_migel_items_by_migel_code('153050001')[0].name.de
-> CONTAM Vaginaltampon 26mm regular

Note

  • bin/admin works
  • It maybe a problem of view

Experiment

  • src/state/drug/init.rb
class Init < State::Drugs::Global
  VIEW = View::Drugs::Search
  DIRECT_EVENT = :home_drugs
  def init
p "1"
    super
p "2"
    @model = OpenStruct.new
p "3"
    fachinfos = @session.app.sorted_fachinfos
p "4"
    if newest = fachinfos.first
p "41"
      revision = newest.revision
p "42"
      date = Time.local(revision.year, revision.month, revision.day)
p "43"
      day = 24 * 3600
p "44"
      range = (date-day)...(date+day)
p "45"
      @model.fachinfo_news = fachinfos.select { |fi|
        range.include? fi.revision
      }
p "46"
    end
p "5"
    @model.feedbacks = @session.app.sorted_feedbacks[0,5]
  end

Run

  • bin/currencyd
  • (bin/yusd)
  • ruby193 -I ../oddb/lib bin/oddbd

Access

Log

"1"
"2"
"3"
"4"
"41"
"42"
"43"
"44"
"45"

Note

  • Something happens at range.include? fi.revision

Comment out the range.include? fi.revision

  • src/state/drug/init.rb
 def init
   super
   @model = OpenStruct.new
   fachinfos = @session.app.sorted_fachinfos
   if newest = fachinfos.first
     revision = newest.revision
     date = Time.local(revision.year, revision.month, revision.day)
     day = 24 * 3600
     range = (date-day)...(date+day)
     @model.fachinfo_news = fachinfos.select { |fi|
        #range.include? fi.revision
        true
     }
   end
   @model.feedbacks = @session.app.sorted_feedbacks[0,5]
 end

suspend

Access

Result

  • Failed
 Encoding::CompatibilityError incompatible character encodings: ASCII-8BIT and UTF-8

Log

error in SBSM::Session#process: /
NoMethodError
undefined method `[]' for #<DRb::DRbUnknown:0x0000000751f9f8>
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/sbsm-1.0.0/lib/sbsm/session.rb:204:in `import_cookies'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/sbsm-1.0.0/lib/sbsm/session.rb:355:in `process'
/home/masa/ywesee/oddb.org/src/util/session.rb:113:in `process'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/sbsm-1.0.0/lib/sbsm/session.rb:168:in `block in drb_process'
<internal:prelude>:10:in `synchronize'
error in SBSM::Session#to_html: /
Encoding::CompatibilityError
incompatible character encodings: ASCII-8BIT and UTF-8
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:146:in `block in field_html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:144:in `each'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:144:in `field_html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:135:in `block in to_html'
(eval):1256:in `tr'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:134:in `to_html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:274:in `block (2 levels) in to_html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:274:in `collect'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:274:in `block in to_html'
(eval):769:in `table'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:273:in `to_html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/composite.rb:263:in `to_html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:93:in `block in component_html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:91:in `each'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:91:in `component_html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:110:in `block in to_html'
(eval):1290:in `td'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:109:in `to_html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:146:in `block in field_html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:144:in `each'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:144:in `field_html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:135:in `block in to_html'
(eval):1256:in `tr'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:134:in `to_html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:274:in `block (2 levels) in to_html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:274:in `collect'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:274:in `block in to_html'
(eval):769:in `table'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb:273:in `to_html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/composite.rb:263:in `to_html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/template.rb:123:in `block in to_html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/template.rb:116:in `call'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/template.rb:116:in `template_tags'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/template.rb:111:in `block (2 levels) in template_html'
(eval):1086:in `body'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/template.rb:110:in `block in template_html'
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/cgi/html.rb:432:in `block in html'
(eval):1069:in `html'
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/cgi/html.rb:432:in `html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/template.rb:109:in `template_html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/template.rb:122:in `to_html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/sbsm-1.0.0/lib/sbsm/state.rb:179:in `to_html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/sbsm-1.0.0/lib/sbsm/session.rb:442:in `to_html'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/sbsm-1.0.0/lib/sbsm/session.rb:169:in `block in drb_process'
<internal:prelude>:10:in `synchronize'
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/sbsm-1.0.0/lib/sbsm/session.rb:167:in `drb_process'
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/drb/drb.rb:1548:in `perform_without_block'
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/drb/drb.rb:1508:in `perform'
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/drb/drb.rb:1586:in `block (2 levels) in main_loop'
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/drb/drb.rb:1582:in `loop'
/home/masa/bin/ruby193rc1/lib/ruby/1.9.1/drb/drb.rb:1582:in `block in main_loop'

Comment out

  • ruby193rc1/lib/ruby/gems/1.9.1/gems/sbsm-1.0.0/lib/sbsm/session.rb
    def import_cookies(request)
      reset_cookie()
 =begin
      if(cuki = request.cookies[self::class::PERSISTENT_COOKIE_NAME])
        cuki.each { |cuki_str|
          CGI.parse(CGI.unescape(cuki_str)).each { |key, val|
            key = key.intern
            valid = @validator.validate(key, val.compact.last)
            @cookie_input.store(key, valid)
          }
        }
      end
 =end
    end

Note

  • Maybe two enconding characters are mixed together in the generated html code

Experiment

  • ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/grid.rb
        def field_html(cgi)
...
              #html << field.to_html(cgi)
              html << field.to_html(cgi).force_encoding('utf-8')
...

Access

Result


view · edit · sidebar · attach · print · history
Page last modified on October 07, 2011, at 07:25 AM