----------------------------------------------------------------------------------------- install yus $ git clone git://scm.ywesee.com/yus/.git do the Guide.txt $ sudo /usr/bin/gem install needle --version '=1.3.0' $ sudo /usr/bin/gem install pg --version '=0.9.0' $ sudo /usr/bin/gem install postgres --version '=0.7.9.2008.01.28' $ sudo /usr/bin/gem install ruby-password $ sudo /usr/bin/gem install yus $ sudo mkdir -p /etc/yus/data $ ssh-keygen -t rsa $ openssl req -new -x509 -key .ssh/id_rsa -out .ssh/id_rsa.crt $ cp /home/jsaak/.ssh/id_rsa /etc/yus/data/yus.key $ cp /home/jsaak/.ssh/id_rsa.crt /etc/yus/data/yus.crt $ cp WHAT??? TODO /etc/yus/data/yus.crt $ vim sha256.rb require 'digest/sha2' print "password: ", ARGV[0], "\n" print "SHA256 encoding: ",Digest::SHA256.hexdigest(ARGV[0]),"\n" $ vim /etc/yus/yus.yml $ /usr/bin/yus_add_user jsaak@napalm.hu login org.oddb.RootUser /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- rclconf (LoadError) from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /usr/lib64/ruby/gems/1.8/gems/yus-1.0.0/bin/yus_add_user:8 from /usr/bin/yus_add_user:19:in `load' from /usr/bin/yus_add_user:19 $ sudo /usr/bin/gem install rclconf $ /usr/bin/yus_add_user jsaak@napalm.hu login org.oddb.RootUser /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- password (LoadError) $ emerge ruby-password /usr/lib64/ruby/1.8/drb/drb.rb:736:in `open': drbssl://localhost:9997 - # (DRb::DRbConnError) $ /usr/bin/yusd /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- odba (LoadError) $ sudo /usr/bin/gem install odba $ /usr/bin/yusd /usr/lib64/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) this where i am now ----------------------------------------------------------------------------------------- $ vim /etc/apache2/vhosts.d/01_oddb_vhost.conf RubyRequire '/usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.0.5/lib/sbsm/trans_handler' ----------------------------------------------------------------------------------------- install ycurrency $ sudo /usr/local/bin/gem install ycurrency $ /usr/local/bin/currencyd and keep it running ----------------------------------------------------------------------------------------- $ vim /var/www/oddb.org/doc/index.rbx add line before requires $: << '/usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.0.5/lib' ----------------------------------------------------------------------------------------- $ vim /etc/hosts add to localhost -> oddb.yourname.org $ vim /etc/apache2/vhosts.d/01_oddb_vhost.conf set Server name to -> oddb.yourname.org $ /etc/init.d/apache2 restart ----------------------------------------------------------------------------------------- $ /usr/local/bin/ruby bin/oddbd now it runs ok ----------------------------------------------------------------------------------------- $ /usr/local/bin/ruby bin/oddbd /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/marshal.rb:15:in `load': undefined class/module CSV::Cell (ArgumentError) patch $ wget 'http://dev.ywesee.com/uploads/$PageName//csv.rb.patch.20111123.txt' $ patch -p 0 < csv.rb.patch.20111123.txt ----------------------------------------------------------------------------------------- $ /usr/local/bin/ruby bin/oddbd /usr/local/lib/ruby/gems/1.9.1/gems/dbd-pg-0.3.9/lib/dbd/pg/statement.rb:62:in `rescue in execute': ERROR: relation "oddb_persistence_pointer" already exists (DBI::ProgrammingError) $ sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'empty';" edit /var/www/oddb.org/etc/db_connection.rb set password to 'empty' $ wget 'http://dev.ywesee.com/uploads/$PageName//statement.rb.patch.20111125.txt' $ wget 'http://dev.ywesee.com/uploads/$PageName//row.rb.patch.20111125.txt' $ patch -p 0 statement.rb.patch.20111125.txt $ patch -p 0 row.rb.patch.20111125.txt ----------------------------------------------------------------------------------------- run oddb again $ /usr/local/bin/ruby bin/oddbd patches here: http://dev.ywesee.com/wiki.php/Choddb/Ruby193p0 $ wget 'http://dev.ywesee.com/uploads/$PageName//columninfo.rb.patch.20111123.txt' $ patch -p 0 columninfo.rb.patch.20111123.txt ----------------------------------------------------------------------------------------- install mod_ruby $ cd src $ git clone https://github.com/shugo/mod_ruby.git $ cd mod_ruby $ sudo /usr/bin/ruby ./configure.rb --with-apxs --with-apr-includes=/usr/include/apr-1 $ sudo make $ sudo make install $ sudo mv 21_mod_ruby.conf /etc/apache2/modules.d/ LoadModule ruby_module modules/mod_ruby.so # taken from the example file # If the ruby module is installed, this will be enabled. # for Apache::RubyRun RubyRequire apache/ruby-run # exec files under /ruby as ruby scripts. SetHandler ruby-object RubyHandler Apache::RubyRun.instance Options ExecCGI # exec *.rbx as ruby scripts. SetHandler ruby-object RubyHandler Apache::RubyRun.instance $ /etc/init.d/apache2 restart ----------------------------------------------------------------------------------------- configure apache emerge apache add "-D RUBY" to APACHE2_OPTS $ cp httpd.conf /etc/apache2/ $ cp 01_oddb_vhost.conf /etc/apache2/vhosts.d/ ----------------------------------------------------------------------------------------- $ mkdir -p /var/www/oddb.org/setup/ $ cp db_connection.rb /var/www/oddb.org/etc/ ----------------------------------------------------------------------------------------- install postgresql $ ls /usr/portage/dev-db/postgresql-server/ $ emerge -av "=postgresql-server-8.4.10-r1" $ emerge --config dev-db/postgresql-server:8.4 $ /etc/init.d/postgresql-8.4 start $ rc-config add postgresql-8.4 default $ sudo -u postgres dropdb oddb.org.ruby193 dropdb: database removal failed: ERROR: database "oddb.org.ruby193" does not exist $ sudo -u postgres createdb -E UTF8 -T template0 oddb.org.ruby193 create role $ sudo -u postgres psql -c 'create role oddb;' import data $ mkdir -p /var/lib/postgresql/8.4/data/sql $ zcat file.sql | psql -U postgres oddb.org.ruby193 ----------------------------------------------------------------------------------------- oddb.org again as root $ /usr/local/bin/ruby bin/oddbd /var/www/oddb.org/src/util/quanty/parse.rb:464:in `module_eval': parse.y:84: invalid multibyte char (US-ASCII) (SyntaxError) parse.y:84: invalid multibyte char (US-ASCII) $ vim /var/www/oddb.org/src/util/quanty/parse.rb add first line: # encoding: UTF-8 $ /usr/local/bin/ruby bin/oddbd /usr/local/lib/ruby/gems/1.9.1/gems/paypal-2.0.0/lib/notification.rb:52:in `': undefined method `cattr_accessor' for Paypal::Notification:Class (NoMethodError) add to /usr/local/lib/ruby/gems/1.9.1/gems/paypal-2.0.0/lib/notification.rb: require 'active_support/core_ext/class/attribute_accessors' ----------------------------------------------------------------------------------------- recompiling ruby with yaml as user $ cd src $ wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz $ tar xzvf yaml-0.1.4.tar.gz $ cd yaml-0.1.4 $ ./configure --prefix=/usr/local $ make $ sudo make install $ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz $ tar xzvf ruby-1.9.3-p0.tar.gz $ cd ruby-1.9.3-p0 $ ./configure did not use those ##--prefix=/usr/local --enable-shared --disable-install-doc --with-opt-dir=/usr/local/lib $ make $ sudo make install ----------------------------------------------------------------------------------------- install oddb.org as root $ cd /var/www $ git clone git://scm.ywesee.com/oddb.org/.git $ cd oddb.org/data/quanty using ruby1.8 $ /usr/local/bin/gem install racc $ make $ make install $ cd /var/www/oddb.org $ /usr/local/bin/ruby bin/oddbd /var/www/oddb.org/src/util/oddbapp.rb:7: uninitialized constant YAML::ENGINE (NameError) ----------------------------------------------------------------------------------------- recompile htmlgrid as root $ cd /usr/local/lib64/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/ext/htmlgrid $ rm htmlgrid.so $ rm grid.o htmlgrid.o $ /usr/local/bin/ruby extconf.rb $ make ----------------------------------------------------------------------------------------- jsaak@alpine:~/git/ywesee/snippets$ git init jsaak@alpine:~/git/ywesee/snippets$ git add install-gems.rb jsaak@alpine:~/git/ywesee/snippets$ git commit -m 'added' ----------------------------------------------------------------------------------------- multiple versions did not install: ERROR: While executing gem ... (ArgumentError) Illformed requirement ["= 1.0.4,"] reinstalling them, only latest version, changing install-gems.rb: gemlist.split("\n").each do |s| name,version = s.split if version =~ /,/ version = version.tr '(),','' command = "/usr/local/bin/gem install --version '= #{version}' #{name}" puts command `#{command}` STDOUT.flush else end end ----------------------------------------------------------------------------------------- unable to convert "\xFC" from ASCII-8BIT to UTF-8 for lib/rpdf2txt/cmapparser.rb, skipping unable to convert "\xFC" from ASCII-8BIT to UTF-8 for lib/sbsm/user.rb, skipping unable to convert "\xFC" from ASCII-8BIT to UTF-8 for lib/rwv2/handlers.rb, skipping does it skip the whole file or just that character? lets check ----------------------------------------------------------------------------------------- emerge -av imagemagick /usr/local/bin/gem install --version '= 2.12.2' rmagick success ----------------------------------------------------------------------------------------- ERROR: Error installing rmagick: ----------------------------------------------------------------------------------------- emerge "=postgresql-server-8.4.10-r1" ----------------------------------------------------------------------------------------- /etc/make.conf: ACCEPT_KEYWORDS="~amd64" ----------------------------------------------------------------------------------------- emerge "=postgresql-server-8.4.10-r1" ----------------------------------------------------------------------------------------- save logs root@alpine:~/git/ywesee/snippets$ ruby install-gems.rb >error.log 2>&1 ----------------------------------------------------------------------------------------- created install-gems.rb: gemlist = <