view · edit · sidebar · attach · print · history

20111201-debug-export_oddbdat-mail_patinfo_invoices-ruby193-oddb_org

<< Masa.20111202-debug-invoicers-migel-ruby193-debug-price-feeds-new-package-button-oddb_org | 2011 | Masa.20111130-debug-update_price_feeds-exporters-ruby193-oddb_org >>


  1. Debug export_oddbdat on Ruby 1.9.3
  2. Debug invoicers on Ruby 1.9.3
  3. Exchange Date object between Ruby 1.8 and 1.9

Goal/Estimate/Evaluation
  • Debug invoicers on Ruby 1.9.3 / 70% / 70%
Milestones
  • exporters
    1. export_oddbdat
    2. mail_patinfo_invoices
Commit

Debug export_oddbdat on Ruby 1.9.3

Refer to http://dev.ywesee.com/wiki.php/Choddb/Ruby193p0#export_oddbdat_20111201

Debug invoicers on Ruby 1.9.3

Refer to http://dev.ywesee.com/wiki.php/Choddb/Ruby193p0#invoicers_20111201

Exchange Date object between Ruby 1.8 and 1.9

Problem

  • Generally, Date instance cannot be exchanged between Ruby 1.8 and 1.9 via DRb

Example (fail)

Run

  • server (Ruby 1.8)
masa@masa ~/work/drb_test $ ruby18 drb_server1.rb
druby://localhost:12346
Hello, World.
2011-12-01
  • client (Ruby 1.9)
masa@masa ~/work/drb_test $ ruby193 drb_client1.rb
(druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:585:in `load': instance of Date needs to have method `marshal_load' (TypeError)
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:585:in `load'
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:581:in `exclusive'
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:581:in `load'
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:619:in `recv_request'
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:618:in `times'
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:618:in `recv_request'
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:911:in `recv_request'
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:1530:in `init_with_client'
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:1542:in `setup_message'
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:1494:in `perform'
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:1589:in `main_loop'
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:1585:in `loop'
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:1585:in `main_loop'
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:1581:in `start'
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:1581:in `main_loop'
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:1430:in `run'
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:1427:in `start'
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:1427:in `run'
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:1347:in `initialize'
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:1627:in `new'
        from (druby://localhost:12346) /usr/lib64/ruby/1.8/drb/drb.rb:1627:in `start_service'
        from (druby://localhost:12346) drb_server.rb:19
        from drb_client.rb:8:in `<main>'

Experiment (succeed)

Run

  • server (Ruby 1.8)
masa@masa ~/work/drb_test $ ruby18 drb_server.rb
druby://localhost:12346
Hello, World.
2011-12-01
2010-05-02
  • client (Ruby 1.9)
masa@masa ~/work/drb_test $ ruby193 drb_client.rb
view · edit · sidebar · attach · print · history
Page last modified on April 04, 2012, at 08:58 AM