view · edit · sidebar · attach · print · history

20120125-fix-untaint-sbsm-check-mod_ruby-193-update-s31x-mechanize-new-fachifno

<< Masa.20120126-update-TextInfoPlugin | Index | Masa.20120124-fix-quanty-page-recycle-object-dt-error-minifi-recent-registration-interaction_basket-encoding-errors-oddb_org >>


  1. Install mod_ruby on Ruby 1.9.3
  2. Check de.oddb.org on mod_ruby 1.9.3
  3. Update s13x with pharmacode
  4. Update FI, PI

Commits
  1. Fix untaint for trans_hander.rb (sbsm)
  2. Replaced fachinfo_id to the highest pharmacode associated with the fachinfo in s31x (oddb.org)

Install mod_ruby on Ruby 1.9.3

Memo

masa@masa ~/ywesee/oddb.org $ locate mod_ruby.so
/usr/lib64/apache2/modules/mod_ruby.so

Install

  1. compile ruby 1.9.3 with ./configure --enable-shared
    1. make
    2. sudo make install
    3. fix csv.rb http://dev.ywesee.com/uploads/$PageName//csv.rb.patch.20111123.txt
  2. git clone https://github.com/shugo/mod_ruby.git
    1. compile mod_ruby with ./configure.rb --with-apr-includes='/usr/include/apr-1'
    2. sudo mv mod_ruby.so /usr/lib64/apache2/modules/
    3. make
    4. sudo make install
gcc -shared -o mod_ruby.so mod_ruby.o ruby_config.o apachelib.o array_header.o table.o connection.o server.o request.o upload.o cookie.o paramtable.o multival.o bucket.o uri.o error.o apache_request.o apache_multipart_buffer.o apache_cookie.o -L/usr/lib64  -L/usr/local/lib -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib -lruby  -lpthread -lrt -ldl -lcrypt -lm 
/usr/bin/install -c -d /usr/lib64/apache2/modules
/usr/bin/install -c -m 555 mod_ruby.so /usr/lib64/apache2/modules
/usr/bin/install -c -d /usr/local/lib/ruby/1.9.1/apache
/usr/local/bin/ruby -e "%w!apache/ruby-run.rb apache/registry.rb apache/eruby-run.rb apache/erb-run.rb apache/rd2html.rb apache/ruby-debug.rb apache/eruby-debug.rb apache/ruby-profile.rb apache/rails-dispatcher.rb apache/query.rb auto-reload.rb!.each{|file| system(%Q!#{'/usr/bin/install -c -m 644'} /home/masa/work/mod_ruby/lib/#{file} /usr/local/lib/ruby/1.9.1/#{file}!)}"

Error (if mod_ruby.so is just copied no by using make install)

  • /var/log/apache2/error_log
[Wed Jan 25 09:03:56 2012] [error] mod_ruby: error in ruby
[Wed Jan 25 09:03:56 2012] [error] mod_ruby: (eval):1:in `<main>': uninitialized constant Apache::RubyRun (NameError)

ldd check

masa@masa ~/work/mod_ruby $ ldd /usr/lib64/apache2/modules/mod_ruby.so 
        linux-vdso.so.1 =>  (0x00007fff6dfd7000)
        libruby.so.1.9 => /usr/local/lib/libruby.so.1.9 (0x00007f53726f1000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00007f53724ba000)
        librt.so.1 => /lib/librt.so.1 (0x00007f53722b1000)
        libdl.so.2 => /lib/libdl.so.2 (0x00007f53720ad000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x00007f5371e75000)
        libm.so.6 => /lib/libm.so.6 (0x00007f5371bf3000)
        libc.so.6 => /lib/libc.so.6 (0x00007f537189d000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f5372d46000)

Check de.oddb.org on mod_ruby 1.9.3

Error

error in SBSM::Session#process: /
NoMethodError
undefined method `[]' for #<DRb::DRbUnknown:0x7f41d1d62008>
/usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:206:in `import_cookies'
/usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:358:in `process'
./lib/oddb/html/util/session.rb:72:in `process'
/usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:169:in `drb_process'
/usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:168:in `synchronize'
error in SBSM::Session#process: /de/drugs/search/query/inderal/dstype/tradename
NoMethodError
undefined method `[]' for #<DRb::DRbUnknown:0x7f41d1cd2a98>
/usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:206:in `import_cookies'
/usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:358:in `process'
./lib/oddb/html/util/session.rb:72:in `process'
/usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:169:in `drb_process'
/usr/lib64/ruby/site_ruby/1.8/sbsm/session.rb:168:in `synchronize'

suspend

Interim Conclusion

  • ch.oddb.org works on mod_ruby 1.9.3 but de.oddb.org does not work on it
  • mod_ruby should work on Ruby 1.8 for the moment
  • Otherwise we should update the other ywesee applications for Ruby 1.9 and migrate data for Ruby 1.9

Update s13x with pharmacode

Task

  • Replace fachinfo_id to the highest number of pharmacode associated with the fachinfo
  • If there is no pharmacode associated with the fahcinfo, the fachinfo data is not exported

Commit

view · edit · sidebar · attach · print · history
Page last modified on January 25, 2012, at 05:15 PM