<< | Index | >>
suspend
suspend
Refer to http://dev.ywesee.com/wiki.php/Choddb/Ruby193RC1
Task
Update
GLOBAL_MAP = {#:company => State::Companies::Company,
def company
if oid = @session.user_input(:oid) and model = @session.app.company(oid)
if @session.allowed?('edit', model)
State::Companies::RootCompany.new(@session, model)
else
State::Companies::Company.new(@session, model)
end
else
Http404.new(@session, nil)
end
end
Commit
Error
NoMethodError undefined method `business_area' for nil:NilClass
Note
Task
Updates
Access
Result
Bug
Update
def name(model)
...
args = {
#'search_query' => model.name_base,
'search_query' => model.name_base.split.first,
}
link.href = @lookandfeel._event_url(:search, args)
Access
Result
Note
Commit
Task
Commit
Access
Bug
Updates
def print if pointer = @session.user_input(:pointer) if((model = pointer.resolve(@session.app)) && (klass = resolve_state(pointer, :print))) klass.new(@session, model) endelsif iksnr = @session.user_input(:reg) and reg = @session.app.registration(iksnr) and seq = reg.sequence(@session.user_input(:seq)) and pi = seq.patinfo
State::Drugs::PatinfoPrint.new(@session, pi)
elsif iksnr = @session.user_input(:fachinfo) and reg = @session.app.registration(iksnr) and fi = reg.fachinfo State::Drugs::FachinfoPrint.new(@session, fi) end end
def print(model, session=@session, key=:print) link = HtmlGrid::Link.new(key, model, session, self) link.set_attribute('title', @lookandfeel.lookup(:print_title)) args = [ :reg => model.sequences.first.registration.iksnr, :seq => model.sequences.first.seqnr, :patinfo => nil ] link.href = @lookandfeel._event_url(:print, args) link end
Access
Commit
Note
suspend
Problem
error in SBSM::Session#to_html: /de/gcc/feedbacks/pointer/%3A%21registration%2C31706%21sequence%2C01%21package%2C017. ArgumentError Failed to load dictionary: No such file or directory - /home/masa/ywesee/oddb.org/data/captcha/de /usr/lib64/ruby/gems/1.8/gems/turing-0.0.11/lib/turing/challenge.rb:75:in `__orig_initialize__' /usr/lib64/ruby/site_ruby/1.8/sbsm/turing.rb:22:in `initialize' /home/masa/ywesee/oddb.org/src/custom/lookandfeelbase.rb:4144:in `new' /home/masa/ywesee/oddb.org/src/custom/lookandfeelbase.rb:4144:in `captcha' /home/masa/ywesee/oddb.org/src/custom/lookandfeelbase.rb:4206:in `generate_challenge' /home/masa/ywesee/oddb.org/src/view/captcha.rb:5:in `challenge' /home/masa/ywesee/oddb.org/src/view/captcha.rb:8:in `captcha' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:66:in `send' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:66:in `create' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:284:in `compose_component' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:209:in `compose' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:203:in `each' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:203:in `compose' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:55:in `init' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/form.rb:82:in `init' /home/masa/ywesee/oddb.org/src/view/feedbacks.rb:42:in `init' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/component.rb:138:in `initialize' /home/masa/ywesee/oddb.org/src/view/drugs/feedbacks.rb:84:in `new' /home/masa/ywesee/oddb.org/src/view/drugs/feedbacks.rb:84:in `current_feedback' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:66:in `send' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:66:in `create' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:284:in `compose_component' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:209:in `compose' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:203:in `each' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:203:in `compose' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:55:in `init' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/component.rb:138:in `initialize' /home/masa/ywesee/oddb.org/src/view/publictemplate.rb:53:in `new' /home/masa/ywesee/oddb.org/src/view/publictemplate.rb:53:in `content' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:66:in `send' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:66:in `create' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:284:in `compose_component' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:209:in `compose' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:203:in `each' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:203:in `compose' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:55:in `init' /home/masa/ywesee/oddb.org/src/view/publictemplate.rb:50:in `init' /home/masa/ywesee/oddb.org/src/view/resulttemplate.rb:28:in `init' /usr/lib64/ruby/site_ruby/1.8/htmlgrid/component.rb:138:in `initialize' /usr/lib64/ruby/site_ruby/1.8/sbsm/state.rb:285:in `new' /usr/lib64/ruby/site_ruby/1.8/sbsm/state.rb:285:in `view' /usr/lib64/ruby/site_ruby/1.8/sbsm/state.rb:197:in `to_html' /usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:529:in `to_html' /usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:177:in `drb_process' /usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:174:in `synchronize' /usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:174:in `drb_process' /usr/lib64/ruby/1.8/drb/drb.rb:1555:in `__send__' /usr/lib64/ruby/1.8/drb/drb.rb:1555:in `perform_without_block' /usr/lib64/ruby/1.8/drb/drb.rb:1515:in `perform' /usr/lib64/ruby/1.8/drb/drb.rb:1589:in `main_loop' /usr/lib64/ruby/1.8/drb/drb.rb:1585:in `loop' /usr/lib64/ruby/1.8/drb/drb.rb:1585:in `main_loop' /usr/lib64/ruby/1.8/drb/drb.rb:1581:in `start' /usr/lib64/ruby/1.8/drb/drb.rb:1581:in `main_loop' /usr/lib64/ruby/1.8/drb/drb.rb:1430:in `run' /usr/lib64/ruby/1.8/drb/drb.rb:1427:in `start' /usr/lib64/ruby/1.8/drb/drb.rb:1427:in `run' /usr/lib64/ruby/1.8/drb/drb.rb:1347:in `initialize' /usr/lib64/ruby/1.8/drb/drb.rb:1627:in `new' /usr/lib64/ruby/1.8/drb/drb.rb:1627:in `start_service'
Note
Copy data/captcha directory from the server
Access
Result
/usr/lib64/ruby/gems/1.8/gems/gd2-1.1.1/lib/gd2/font.rb:242: [BUG] Segmentation fault ruby 1.8.6 (2009-06-08) [x86_64-linux] Abgebrochen
emerge gd
$ sudo emerge media-libs/gd $ sudo emerge @preserved-rebuild
Note
media-libs/gd Latest version available: 2.0.35-r1 Latest version installed: 2.0.35
Run
/usr/lib64/ruby/gems/1.8/gems/rmagick-2.13.1/lib/RMagick2.so: libMagickCore.so.3: cannot open shared object file: No such file or directory - /usr/lib64/ruby/gems/1.8/gems/rmagick-2.13.1/lib/RMagick2.so (LoadError)
Donwgrade gd lib
$ sudo emerge /usr/portage/media-libs/gd/gd-2.0.35-r1.ebuild
Donwgrade rmagick gem
$ sudo gem install rmagick --version='2.9.0'
Result
Patch
suspend
Task
Access (for example)
PP
TK
Update
def formatted_price(key, model)
...
pointer = if model.is_a?(ODDB::Package) || model.is_a?(ODDB::State::Drugs::Compare::Comparison::PackageFacade)
[:reg, model.registration.iksnr, :seq, model.sequence.seqnr, :pack, model.ikscd]
else
[:pointer, model.pointer]
end
def ddd_price(model, session=@session)
...
pointer = if model.is_a?(ODDB::Package) || model.is_a?(ODDB::State::Drugs::Compare::Comparison::PackageFacade)
[:reg, model.registration.iksnr, :seq, model.sequence.seqnr, :pack, model.ikscd]
else
[:pointer, model.pointer]
end
Commit
Patch
Setup
$ sudo -u postgres dropdb oddb.org; sudo -u postgres createdb -E UTF8 -T template0 oddb.org $ zcat data/sql/oddb.org.20111024.sql.gz |psql -U postgres oddb.org
Run
ruby193 -I ../oddb/lib bin/oddbd > log.dat 2>&1
ch.oddb> migrate_to_utf8
Result