view · edit · sidebar · attach · print · history

Day Two

<< DayOne | Index | DayThree >>

  • after restarting bin/oddbd
 user@localhost:/var/www/$ 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
        Password for
         ["edit", "yus.entities"?],
         ["login", ],
         ["reset_password", []],
         ["set_password", ""?],
         ["view", "org.oddb"?],

(RootUser group is still missing) :

        user@localhost:~$ yus_show <<< aaa
         ["edit", [ ["yus.entities"]]],
         ["login", [ ["org.oddb.RootUser"]]],
         ["reset_password", []],
         ["set_password", [ [""]]],
         ["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/

        smtp_pass: xxxx
        smtp_port: 587
        mail_from: '"masa" <>'
         - ''
        text_info_searchform: ''
        text_info_newssource: ''

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
        Password for 
         ["edit", "yus.entities"?],
         ["edti", "yus.entities"?],
          [ ["create"], ["credit"], ["edit"], ["invoice"], ["login"], ["view"]]],
          [ ["ch.bbmb.Admin"], ["ch.oddb.RootUser"], ["org.oddb.RootUser"], [""], [""]]],
         ["org.oddb.rootuser", []],
         ["reset_password", "everything"?],
         ["rootuser", ?],
         ["set_password", ""?],
         ["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 from commandline
 I, [2012-01-12T15:35:39.592275 #16487]  INFO -- Yus::Server: Authentication succeeded for root:
 I, [2012-01-12T15:37:36.243798 #16487]  INFO -- Yus::Server: Login attempt for from
 W, [2012-01-12T15:37:36.244050 #16487]  WARN -- Yus::Server: Authentication failed for
  • 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
 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 :

 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://
 $ bin/currencyd

=> recompile 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] File does not exist: /var/www/, referer:

=> add the file from

 user@localhost:/var/www/$ wget
view · edit · sidebar · attach · print · history
Page last modified on February 03, 2012, at 09:35 AM