<< | Index | >>
suspend
Commit
Access
Setting log
Procedure
Updates
module ODDB class LookandfeelFactory < SBSM::LookandfeelFactory ...'mymigel'=> [
LookandfeelMyMigel,
],
class LookandfeelMyMigel < SBSM::LookandfeelWrapper ...
Attach:09_mymigel_vhost.conf.20111020.txt
Restart
sudo /etc/init.d/apache2 restart
Run
bin/oddbd
webalizer -c /etc/webalizer/mymigel.oddb.org.conf
Note
# update webalizer stats for virtual hosts */10 * * * * root /usr/local/bin/update_vhost_stats
#!/bin/bash for conf in /etc/webalizer/*.conf do webalizer -c $conf &> /dev/null done
Check (locally)
ok
ok
ok
ok
ok
Check (online)
ok
ok
Note
Process
Commit
Access to DDD info (for example)
Note
Solution
Updates
def init if((pointer = @session.user_input(:pointer))) @model = pointer.resolve(@session.app)elsif atc_code = @session.user_input(:atc_code) and atc_class = @session.app.atc_class(atc_code)
@model = atc_class
else
@model = nil
end
STRINGS = [
:atc_code,
Run
Access
Result
Updates
module AtcDddLink
def atc_ddd_link(atc, session=@session)
if(atc && atc.has_ddd?)
link = HtmlGrid::Link.new(:ddd, atc, session, self)
link.href = @lookandfeel._event_url(:ddd, {'atc_code'=>atc.code})
Access
Result
Commit
Problem
Note
Command log
$ pg_dump -U postgres oddb.org > oddb.org_database.bak.20111020.sql $ sudo -u postgres dropdb oddb.org $ sudo -u postgres createdb -E UTF8 -T template0 oddb.org $ cat oddb.org_database.bak.20111020.sql | psql -U postgres oddb.org
Run
ruby193 -I ../oddb/lib bin/oddbd
Access
Error
/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/composite.rb:78: warning: Hash#index is deprecated; use Hash#key /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/composite.rb:78: warning: Hash#index is deprecated; use Hash#key error in SBSM::Session#to_html: / NoMethodError undefined method `[]' for nil:NilClass /home/masa/ywesee/oddb.org.ruby193/src/model/sponsor.rb:24:in `logo_filename' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/stub.rb:118:in `method_missing' /home/masa/ywesee/oddb.org.ruby193/src/view/sponsorlogo.rb:22:in `init' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/component.rb:138:in `initialize' /home/masa/ywesee/oddb.org.ruby193/src/view/logohead.rb:27:in `new' /home/masa/ywesee/oddb.org.ruby193/src/view/logohead.rb:27:in `sponsor' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/composite.rb:66:in `create' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/composite.rb:301:in `compose_component' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/composite.rb:209:in `block in compose' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/composite.rb:203:in `each' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/composite.rb:203:in `compose' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/composite.rb:55:in `init' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/component.rb:138:in `initialize' /home/masa/ywesee/oddb.org.ruby193/src/view/custom/head.rb:68:in `new' /home/masa/ywesee/oddb.org.ruby193/src/view/custom/head.rb:68:in `head' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/composite.rb:66:in `create' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/composite.rb:301:in `compose_component' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/composite.rb:209:in `block in compose' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/composite.rb:203:in `each' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/composite.rb:203:in `compose' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/composite.rb:55:in `init' /home/masa/ywesee/oddb.org.ruby193/src/view/publictemplate.rb:51:in `init' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/component.rb:138:in `initialize' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/sbsm-1.0.0/lib/sbsm/state.rb:243:in `new' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/sbsm-1.0.0/lib/sbsm/state.rb:243:in `view' /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:450:in `to_html' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/sbsm-1.0.0/lib/sbsm/session.rb:170: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:168: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' ODDB::View::WelcomeHead::COMPONENTS[[1, 0, 0]] in create(sponsor) ODDB::View::Drugs::Search::COMPONENTS[[0, 0]] in create(head) /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/composite.rb:78: warning: Hash#index is deprecated; use Hash#key /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/composite.rb:78: warning: Hash#index is deprecated; use Hash#key error in SBSM::Session#http_headers: / NoMethodError undefined method `[]' for nil:NilClass /home/masa/ywesee/oddb.org.ruby193/src/model/sponsor.rb:24:in `logo_filename' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/stub.rb:118:in `method_missing' /home/masa/ywesee/oddb.org.ruby193/src/view/sponsorlogo.rb:22:in `init' /home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.0/lib/htmlgrid/component.rb:138:in `initialize' /home/masa/ywesee/oddb.org.ruby193/src/view/logohead.rb:27:in `new'
Next
Note
Example
ODBA::Stub was unable to replace Hash#27584864 from ODDB::Sequence:#70501
Encoding::CompatibilityError: incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string) when updating index 'atc_index_company' with a ODDB::AtcClass ["/home/masa/ywesee/oddb.org.ruby193/src/model/company.rb:163:in `split'", "/home/masa/ywesee/oddb.org.ruby193/src/model/company.rb:163:in `search_terms'", "/home/masa/bin/ruby193rc1/lib/ruby /gems/1.9.1/gems/odba-1.0.0/lib/odba/stub.rb:118:in `method_missing'", "(eval):3:in `block in proc_resolve_search_term'"]
TypeError: can't convert String into Integer when updating index 'sequence_generic_type_index' with a ODDB::Sequence ["/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/index.rb:301:in `[]'", "/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/index.rb:301:in `block in current_ids'", "/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/index.rb:299:in `collect'", "/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib /odba/index.rb:299:in `current_ids'"]
NoMethodError: undefined method `inject' for nil:NilClass when updating index 'atc_index_company' with a ODDB::Company ["/home/masa/ywesee/oddb.org.ruby193/src/model/company.rb:48:in `atc_classes'", "(eval):2:in `block in proc_instance_target'", "/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib /odba/index.rb:249:in `call'", "/home/masa/bin/ruby193rc1/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/index.rb:249:in `update_origin'"]
Note
Problem
Solution
Update
module ODDB module RegistrationObserver ... def article_codes codes = [] @registrations.collect { |reg| reg.each_package { |pac| cds = { :article_ean13 => pac.barcode.to_s, } if(pcode = pac.pharmacode) cds.store(:article_pcode, pcode) endif(psize = pac.size)
cds.store(:article_size, psize)
end
codes.push(cds) } } codes end
Run
bin/oddbd
ext/export/bin/exportd
bin/admin
ch.oddb> ODDB::YamlExporter.new(self).export_fachinfos
Result