view · edit · sidebar · attach · print · history

Marshal-Error with ODBA and de.oddb.org

<< GrantDownload | Index | BinAdmin >>

This error probably happens when you load the wrong Database, either ch.oddb.org or oddb_dot_org. ODBA then expects the more files to load the data. Resetup the DB with:

#! /bin/sh

# the 1st day every month this does not work.

ODDB_HOME='/home/zeno/.software/de.oddb.org'

yyyy=`date +"%Y"`
mm=`date +"%m"`
dd=`date +"%d"`

dd=`expr $dd - 1`
if test $dd -lt 10 ;then
    dd=0$dd
fi


m=(dummy January February March April May June July August September October November December)
nm=`expr $mm + 0`


sudo -u postgres dropdb oddb
sudo -u postgres createdb -E UTF8 -T template0 oddb
cd $ODDB_HOME
mkdir data/sql

scp ywesee@server:/var/backup/thinpower/db/postgresql/${m[nm]}-$yyyy/$yyyy-$mm-$dd/22\:00-postgresql_database-oddb-backup.gz data/sql/oddb.$yyyy$mm$dd.sql.gz

cd data/sql
zcat oddb.$yyyy$mm$dd.sql.gz | psql -U postgres oddb

and then also clone the latest software:

#! /bin/sh

ODDB_HOME='/home/zeno/.software'
SETUP_DIR='/home/zeno/.software/de_oddb_setup'

cd $ODDB_HOME
pwd
git clone ssh://ywesee@scm.ywesee.com/home/ywesee/git/de.oddb.org
#git clone git://scm.ywesee.com/de.oddb.org
cp -r $SETUP_DIR/etc de.oddb.org
cp $SETUP_DIR/gitignore de.oddb.org/.gitignore

History

After a fresh git clone of de.oddb.org this error happens:

/usr/lib/ruby/site_ruby/1.8/odba/marshal.rb:15:in `load': undefined class/module ODDB::Drugs::GenericGroup (ArgumentError)

        from /usr/lib/ruby/site_ruby/1.8/odba/marshal.rb:15:in `load'
        from /usr/lib/ruby/site_ruby/1.8/odba/cache.rb:588:in `restore'
        from /usr/lib/ruby/site_ruby/1.8/odba/cache.rb:313:in `fetch_or_restore'
        from /usr/lib/ruby/site_ruby/1.8/odba/cache.rb:308:in `call'
        from /usr/lib/ruby/site_ruby/1.8/odba/cache.rb:308:in `fetch_or_do'
        from /usr/lib/ruby/site_ruby/1.8/odba/cache.rb:312:in `fetch_or_restore'
        from /usr/lib/ruby/site_ruby/1.8/odba/cache.rb:62:in `bulk_restore'
        from /usr/lib/ruby/site_ruby/1.8/odba/cache.rb:59:in `each'
         ... 17 levels...
        from /home/zeno/.software/de.oddb.org/lib/oddb/persistence.rb:4
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from bin/oddbd:10

Ohne diese require und die dazugehörigen files und Verzeichnisse

 require 'oddb/persistence/odba/regulatory/authority'
 require 'oddb/persistence/odba/regulatory/registration'

in

 lib/oddb/persistence/odba.rb

und diese requires

 require "oddb/drugs/generic_group"
 require "oddb/drugs/index_therapeuticus"
 require "oddb/drugs/indication"

in

 lib/oddb/drugs.rb

startet de.oddb.org nicht auf. Sämtliche files wurden vom reinen ODDB Library kopiert.

view · edit · sidebar · attach · print · history
Page last modified on April 13, 2011, at 02:10 PM