<< | Index | >>
suspend
suspend
Confirm the last error
masa@masa ~/ywesee/ch.oddb.org $ ruby1.9 bin/migrate masa@masa ~/ywesee/ch.oddb.org $ ruby1.9 bin/migrate NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "object_pkey" for table "object" NOTICE: CREATE TABLE / UNIQUE will create implicit index "object_name_key" for table "object" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "object_connection_pkey" for table "object_connection" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "collection_pkey" for table "collection" TypeError: can't convert String into Integer when updating index 'oddb_drugs_atc_level_and_code' with a ODDB::Drugs::Atc ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:301:in `[]'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:301:in `block in current_ids'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:299:in `collect'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:299:in `current_ids'"] [...] TypeError: can't convert String into Integer when updating index 'oddb_drugs_atc_level_and_code' with a ODDB::Drugs::Atc ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:301:in `[]'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:301:in `block in current_ids'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:299:in `collect'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:299:in `current_ids'"] [...] TypeError: can't convert String into Integer when updating index 'oddb_drugs_atc_level_and_code' with a ODDB::Drugs::Atc ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:301:in `[]'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:301:in `block in current_ids'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:299:in `collect'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:299:in `current_ids'"] [...] ...
Experiment
/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb
def current_ids(rows, id_name) print "id_name=" p id_name rows.collect { |row| [ row[id_name], @resolve_search_term.keys.collect { |key| [key.to_s, row[key]] }.sort, ] } end
Result
masa@masa ~/ywesee/ch.oddb.org $ ruby1.9 bin/migrate ... id_name="origin_id" id_name="origin_id" id_name="origin_id" id_name="origin_id" id_name="origin_id" id_name="origin_id" id_name="origin_id" TypeError: can't convert String into Integer when updating index 'oddb_drugs_atc_level_and_code' with a ODDB::Drugs::Atc ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:303:in `[]'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:303:in `block in current_ids'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:301:in `collect'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:301:in `current_ids'"] [...] ...
Note
Experiment
/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb
def current_ids(rows, id_name) print "id_name=" p id_name print caller(0).pretty_inspect puts rows.collect { |row| [ row[id_name], @resolve_search_term.keys.collect { |key| [key.to_s, row[key]] }.sort, ] } end
Result
masa@masa ~/ywesee/ch.oddb.org $ ruby1.9 bin/migrate ... id_name="origin_id" ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:301:in `current_ids'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:314:in `current_origin_ids'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:198:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:549:in `each'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:549:in `update_indices'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:475:in `store'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/persistable.rb:267:in `odba_isolated_store'", "/home/masa/ywesee/ch.oddb.org/lib/oddb/persistence/odba/model.rb:29:in `save'", "/home/masa/ywesee/ch.oddb.org/lib/oddb/model.rb:52:in `block in belongs_to'", "bin/migrate:127:in `block in migrate_atc'", "/usr/lib64/ruby/1.9.1/drb/drb.rb:1558:in `call'", "/usr/lib64/ruby/1.9.1/drb/drb.rb:1558:in `perform_without_block'", "/usr/lib64/ruby/1.9.1/drb/drb.rb:1518:in `perform'", "/usr/lib64/ruby/1.9.1/drb/drb.rb:1592:in `block (2 levels) in main_loop'", "/usr/lib64/ruby/1.9.1/drb/drb.rb:1588:in `loop'", "/usr/lib64/ruby/1.9.1/drb/drb.rb:1588:in `block in main_loop'"] ...
Next
Consideration
def current_ids(rows, id_name) rows.collect { |row| [ row[id_name],
Experiment
/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb#current_ids
def current_ids(rows, id_name) print "id_name=" p id_name print caller(0).pretty_inspect puts unless rows[0] print "rows[0].class=" p rows[0].class print "rows[0]=" p rows[0] if rows[0]!=nil exit end end rows.collect { |row| [ row[id_name], @resolve_search_term.keys.collect { |key| [key.to_s, row[key]] }.sort, ] } end
Result
masa@masa ~/ywesee/ch.oddb.org $ ruby1.9 bin/migrate ... rows[0].class=NilClass rows[0]=nil "End"
Notes
Experiment (skip this process)
/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb#current_ids
def current_ids(rows, id_name) if rows.length > 0 rows.collect { |row| [ row[id_name], @resolve_search_term.keys.collect { |key| [key.to_s, row[key]] }.sort, ] } end end
Result
masa@masa ~/ywesee/ch.oddb.org $ ruby1.9 bin/migrate ... NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_atc_level_and_code' with a ODDB::Drugs::Atc ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:549:in `each'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_atc_level_and_code' with a ODDB::Drugs::Atc ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:549:in `each'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_atc_level_and_code' with a ODDB::Drugs::Atc ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:549:in `each'"] [...] ...
Note
Check /usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb#update_target
def update_target(target) # :nodoc: target_id = target.odba_id current = current_origin_ids(target_id) old_terms = current.collect { |row| # <= HERE [row[0], row[1]] }
Note
Consideration
suspend
Experiment
total = server.company_count.to_f count = 0 =begin server.remote_each_atc_class do |atc| unless atc.en.to_s.empty? migrate_atc ODDB::Remote::Drugs::Atc.new url, atc end end =end server.remote_each_company do |remote| company = ODDB::Remote::Business::Company.new(url, remote) unless company.products.empty? migrate_company company end count += 1 print (" " * 8) \ << ("\b" * 8) \ << sprintf('%7.3f%%', count*100/total) \ << ("\b" * 8) $stdout.flush end
Refresh database
sudo -u postgres dropdb oddb sudo -u postgres createdb -E UTF8 -T template0 oddb
Run oddb.org/bin/oddbd
Run ch.oddb.org/bin/migrate
Result
masa@masa ~/ywesee/ch.oddb.org $ ruby1.9 bin/migrate NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "object_pkey" for table "object" NOTICE: CREATE TABLE / UNIQUE will create implicit index "object_name_key" for table "object" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "object_connection_pkey" for table "object_connection" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "collection_pkey" for table "collection" (druby://localhost:10000) /usr/lib64/ruby/1.8/delegate.rb:158:in `method_missing': undefined method `remote_each_company' for #<ODDB::App:0x7f814c4c19c0> (NoMethodError) from bin/migrate:454:in `<main>'
Note
Experiment
def remote_each_company(&block) @companies.extend(DRb::DRbUndumped).each_value(&block) end
Result
NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_sequence_code' with a ODDB::Drugs::Sequence ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_package_code' with a ODDB::Drugs::Package ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_sequence_code' with a ODDB::Drugs::Sequence ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_atc_level_and_code' with a ODDB::Drugs::Atc ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_atc_level_and_code' with a ODDB::Drugs::Atc ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_sequence_code' with a ODDB::Drugs::Sequence ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_galenicform_code' with a ODDB::Drugs::GalenicForm ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_substance_code' with a ODDB::Drugs::Substance ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_sequence_code' with a ODDB::Drugs::Sequence ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_package_code' with a ODDB::Drugs::Package ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_package_code' with a ODDB::Drugs::Package ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_sequence_code' with a ODDB::Drugs::Sequence ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_package_code' with a ODDB::Drugs::Package ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_sequence_code' with a ODDB::Drugs::Sequence ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_atc_level_and_code' with a ODDB::Drugs::Atc ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_atc_level_and_code' with a ODDB::Drugs::Atc ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_sequence_code' with a ODDB::Drugs::Sequence ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_galenicform_code' with a ODDB::Drugs::GalenicForm ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_substance_code' with a ODDB::Drugs::Substance ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_substance_code' with a ODDB::Drugs::Substance ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_substance_code' with a ODDB::Drugs::Substance ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_sequence_code' with a ODDB::Drugs::Sequence ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_package_code' with a ODDB::Drugs::Package ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_package_code' with a ODDB::Drugs::Package ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_sequence_code' with a ODDB::Drugs::Sequence ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_package_code' with a ODDB::Drugs::Package ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_package_code' with a ODDB::Drugs::Package ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_package_code' with a ODDB::Drugs::Package ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_sequence_code' with a ODDB::Drugs::Sequence ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_package_code' with a ODDB::Drugs::Package ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_package_code' with a ODDB::Drugs::Package ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_sequence_code' with a ODDB::Drugs::Sequence ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...] NoMethodError: undefined method `collect' for nil:NilClass when updating index 'oddb_drugs_atc_level_and_code' with a ODDB::Drugs::Atc ["/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:201:in `update_target'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/index.rb:161:in `update'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/stub.rb:112:in `method_missing'", "/usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:550:in `block in update_indices'"] [...]
Notes
Next
BraSt
Question
Experiment (Try to run the ramaze version after the 'migrate' script runs)
Confirm Ramaze version of ch.oddb.org runs
Clear the database
$ sudo -u postgres dropdb ch_oddb_org; sudo -u postgres createdb -E UTF8 -T template0 ch_oddb_org
Run oddb.org/bin/oddbd
Set ch.oddb.org/lib/oddb/config.rb
#'db_name' => 'oddb', 'db_name' => 'ch_oddb_org', #'db_user' => 'oddb', 'db_user' => 'postgres', #'db_auth' => 'oddb', 'db_auth' => '',
Run ch.oddb.org/bin/migrate
masa@masa ~/ywesee/ch.oddb.org $ ruby1.9 bin/migrate . ... (Many NoMethod Error) ... (druby://localhost:54642) /usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:488:in `store': can't add a new key into hash during iteration (RuntimeError) from (druby://localhost:54642) /usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:488:in `block in store_cache_entry' from (druby://localhost:54642) <internal:prelude>:10:in `synchronize' from (druby://localhost:54642) /usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:482:in `store_cache_entry' from (druby://localhost:54642) /usr/lib64/ruby/site_ruby/1.9.1/odba/cache.rb:474:in `store' from (druby://localhost:54642) /usr/lib64/ruby/site_ruby/1.9.1/odba/persistable.rb:267:in `odba_isolated_store' from (druby://localhost:54642) /usr/lib64/ruby/site_ruby/1.9.1/odba/persistable.rb:384:in `block in odba_store_unsaved' from (druby://localhost:54642) /usr/lib64/ruby/site_ruby/1.9.1/odba/persistable.rb:381:in `each' from (druby://localhost:54642) /usr/lib64/ruby/site_ruby/1.9.1/odba/persistable.rb:381:in `odba_store_unsaved' from (druby://localhost:54642) /usr/lib64/ruby/site_ruby/1.9.1/odba/persistable.rb:369:in `odba_store' from (druby://localhost:54642) /home/masa/ywesee/ch.oddb.org/lib/oddb/persistence/odba/model.rb:32:in `block in save' from (druby://localhost:54642) /home/masa/ywesee/ch.oddb.org/lib/oddb/persistence/odba/model.rb:30:in `each' from (druby://localhost:54642) /home/masa/ywesee/ch.oddb.org/lib/oddb/persistence/odba/model.rb:30:in `save' from (druby://localhost:54642) /home/masa/ywesee/ch.oddb.org/lib/oddb/model.rb:52:in `block in belongs_to' from (druby://localhost:54642) bin/migrate:357:in `migrate_product' from (druby://localhost:54642) bin/migrate:144:in `block in migrate_company' from (druby://localhost:54642) bin/migrate:143:in `each' from (druby://localhost:54642) bin/migrate:143:in `migrate_company' from (druby://localhost:54642) bin/migrate:455:in `block in <main>' from (druby://localhost:54642) /usr/lib64/ruby/1.9.1/drb/drb.rb:1558:in `call' from (druby://localhost:54642) /usr/lib64/ruby/1.9.1/drb/drb.rb:1558:in `perform_without_block' from (druby://localhost:54642) /usr/lib64/ruby/1.9.1/drb/drb.rb:1518:in `perform' from (druby://localhost:54642) /usr/lib64/ruby/1.9.1/drb/drb.rb:1592:in `block (2 levels) in main_loop' from (druby://localhost:54642) /usr/lib64/ruby/1.9.1/drb/drb.rb:1588:in `loop' from (druby://localhost:54642) /usr/lib64/ruby/1.9.1/drb/drb.rb:1588:in `block in main_loop' from (druby://localhost:10000) /usr/lib64/ruby/1.8/drb/invokemethod.rb:10:in `block_yield' from (druby://localhost:10000) /usr/lib64/ruby/1.8/drb/invokemethod.rb:17:in `perform_with_block' from (druby://localhost:10000) /home/masa/ywesee/oddb.org/src/util/oddbapp.rb:594:in `each_value' from (druby://localhost:10000) /home/masa/ywesee/oddb.org/src/util/oddbapp.rb:594:in `remote_each_company' from bin/migrate:452:in `<main>'
Note
Confirm the ramaze runs
Next
Install
Emerge dia failed
!!! /var/tmp/portage/app-office/dia-0.97.1/work/dia-0.97.1/config.log * ERROR: app-office/dia-0.97.1 failed: * econf failed * * Call stack: * ebuild.sh, line 56: Called src_configure * environment, line 5780: Called gnome2_src_configure * environment, line 3306: Called econf '--without-cairo' '--with-python' '--disable-db2html' '--disable-gnome' '--disable-libemf' '--without-swig' '--without-hardbooks' '--disable-static' '--docdir=/usr/share/doc/dia-0.97.1' '--disable-gtk-doc' * ebuild.sh, line 552: Called die * The specific snippet of code: * die "econf failed" * * If you need support, post the output of 'emerge --info =app-office/dia-0.97.1', * the complete build log and the output of 'emerge -pqv =app-office/dia-0.97.1'. * The complete build log is located at '/var/tmp/portage/app-office/dia-0.97.1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-office/dia-0.97.1/temp/environment'. * S: '/var/tmp/portage/app-office/dia-0.97.1/work/dia-0.97.1' >>> Failed to emerge app-office/dia-0.97.1, Log file: >>> '/var/tmp/portage/app-office/dia-0.97.1/temp/build.log' * Messages for package app-office/dia-0.97.1: * ERROR: app-office/dia-0.97.1 failed: * econf failed * * Call stack: * ebuild.sh, line 56: Called src_configure * environment, line 5780: Called gnome2_src_configure * environment, line 3306: Called econf '--without-cairo' '--with-python' '--disable-db2html' '--disable-gnome' '--disable-libemf' '--without-swig' '--without-hardbooks' '--disable-static' '--docdir=/usr/share/doc/dia-0.97.1' '--disable-gtk-doc' * ebuild.sh, line 552: Called die * The specific snippet of code: * die "econf failed" * * If you need support, post the output of 'emerge --info =app-office/dia-0.97.1', * the complete build log and the output of 'emerge -pqv =app-office/dia-0.97.1'. * The complete build log is located at '/var/tmp/portage/app-office/dia-0.97.1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-office/dia-0.97.1/temp/environment'. * S: '/var/tmp/portage/app-office/dia-0.97.1/work/dia-0.97.1'