view · edit · sidebar · attach · print · history

Day Two

<< DayOne | Index | DayThree >>

  • after restarting bin/oddbd
 user@localhost:/var/www/oddb.org$ bin/oddbd
 /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- yus/entity (LoadError)
 from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'

=> install 'yus' gem for ruby 1.9

  • after nearly replicating permissions from email:
        masa@masa ~/ywesee/yus/bin $ ruby18 yus_show mhatakeyama@ywesee.com
        Password for mhatakeyama@ywesee.com:
        ["mhatakeyama@ywesee.com",
         ["edit", "yus.entities"?],
         ["login", ],
         ["reset_password", []],
         ["set_password", "mhatakeyama@ywesee.com"?],
         ["view", "org.oddb"?],
         ["RootUser"]]

(RootUser group is still missing) :

        user@localhost:~$ yus_show xxx@email.com <<< aaa
        ["xxx@email.com",
         ["edit", [ ["yus.entities"]]],
         ["login", [ ["org.oddb.RootUser"]]],
         ["reset_password", []],
         ["set_password", [ ["xxx@email.com"]]],
         ["view", [ ["org.oddb"]]]]

=> still getting the same error. Trying to work around by resetting password, in order to do that we need to set up smtp handling (and also changing user email address to make the mail deliverable):

in file: /var/www/oddb.org/etc/oddb.yml

        ---
        url_bag_sl_zip:
        "http://bag.e-mediat.net/SL2007.Web.External/File.axd?file=XMLPublications.zip"
        smtp_server: smtp.gmail.com
        smtp_domain: ywesee.com
        smtp_user: mhatakeyama@ywesee.com
        smtp_pass: xxxx
        smtp_port: 587
        mail_from: '"masa" <mhatakeyama@ywesee.com>'
        mail_to:
         - 'mhatakeyama@ywesee.com'
        text_info_searchform: 'http://www.kompendium.ch/Search.aspx?lang=de'
        text_info_newssource: 'http://www.documedinfo.ch/content/page_1.aspx'

the email containing reset link arrives; Then set at least 4-character long password, and logging in works

  • after setting up yus permissions:
        user@localhost:~$ yus_show xxx@email.com
        Password for email@domain.com: 
        ["xxx@email.com",
         ["edit", "yus.entities"?],
         ["edti", "yus.entities"?],
         ["grant",
          [ ["create"], ["credit"], ["edit"], ["invoice"], ["login"], ["view"]]],
         ["login",
          [ ["ch.bbmb.Admin"], ["ch.oddb.RootUser"], ["org.oddb.RootUser"], ["org.oddb.de.Admin"], ["org.oddb.de.PowerUser"]]],
         ["org.oddb.rootuser", []],
         ["reset_password", "everything"?],
         ["rootuser", ?],
         ["set_password", "xxx@email.com"?],
         ["view", ]]

still getting an error (in yus log) when logging in from the website:

 I, [2012-01-12T15:35:39.592098 #16487]  INFO -- Yus::Server: Login attempt for email@domain.com from commandline
 I, [2012-01-12T15:35:39.592275 #16487]  INFO -- Yus::Server: Authentication succeeded for root: email@domain.com
 ...
 I, [2012-01-12T15:37:36.243798 #16487]  INFO -- Yus::Server: Login attempt for xxx@email.com from oddb.org
 W, [2012-01-12T15:37:36.244050 #16487]  WARN -- Yus::Server: Authentication failed for xxx@email.com
  • create yus user
 user@localhost:/etc/yus/data$ yus_add_user
 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- password (LoadError)
 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
 from /usr/lib/ruby/gems/1.8/gems/yus-1.0.0/bin/yus_add_user:7
 from /usr/bin/yus_add_user:19:in `load'
 from /usr/bin/yus_add_user:19

=> gem install ruby-password

  • create yus database user
 /usr/lib/ruby/site_ruby/1.8/dbd/pg/database.rb:82:in `initialize': FATAL:  role "yus" does not exist (DBI::OperationalError)

=>

 echo 'create user yus' | sudo psql -U postgres
  • set up yus server (which must run with ruby 1.8)
 install gems (yus rclconf odba dbi needle pg dbd-pg) for ruby 1.8
 configure yus as described in http://dev.ywesee.com/wiki.php/Masa/20101019-debug-importGkv#SetYus
 create 'yus' database: sudo -u postgres createdb -E UTF8 -T template0 yus

=> still an error

 user@localhost:~$ yusd           
 /usr/lib/ruby/gems/1.8/gems/yus-1.0.0/lib/yus/server.rb:9: warning: already initialized constant VERSION
 /usr/lib/ruby/gems/1.8/gems/dbi-0.4.5/lib/dbi.rb:300:in `load_driver': Unable to load driver 'pg' (underlying error: wrong constant name pg) (DBI::InterfaceError)
        	from /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
        	from /usr/lib/ruby/gems/1.8/gems/dbi-0.4.5/lib/dbi.rb:242:in `load_driver'

=> install libraries almost exactly as described on http://dev.ywesee.com/wiki.php/Masa/20110105-update-dbi-pg-oddbOrg#TestDbi :

 ruby1.8 gems: deprecated (2.0.1) 
 emerge: ruby-dbi (0.4.3), pg (0.11), dbd-pg (0.3.9)
  • set up currency server
 $ sudo /usr/local/bin/gem install ycurrency
 $ git clone git://scm.ywesee.com/currency
 $ bin/currencyd

=> recompile htmlgrid.so with ruby 1.9

 user@localhost:~/gems/htmlgrid-1.0.4/ext/htmlgrid$ sudo /usr/local/bin/ruby extconf.rb
 user@localhost:~/gems/htmlgrid-1.0.4/ext/htmlgrid$ sudo make
  • in /var/log/apache2/error_log
 [Thu Jan 12 09:15:30 2012] [error] [client 127.0.0.1] File does not exist: /var/www/oddb.org/doc/resources/gcc/oddb.css, referer: http://oddb.user.org/resources/errors/appdown.html

=> add the file from ch.oddb.org

 user@localhost:/var/www/oddb.org/doc/resources/gcc$ wget http://ch.oddb.org/resources/gcc/oddb.css
view · edit · sidebar · attach · print · history
Page last modified on February 03, 2012, at 09:35 AM