view · edit · sidebar · attach · print · history

< Niklaus.20240130-ruby-330 | Index | Niklaus.20220411-textinfo-problems >>

20230103-ruby-320- -oekk

Summary

  • Port oddb.org to Ruby 3.2 and fix problems with ydim and UTF-8 oeekk
  • Keep in Mind

Commits

ypdf-writer:

YDIM:

YDIM-HTML:

Index

Fix UTF-8 problem with oedd.oddb.org

The following error was seen by Zeno

Encoding::CompatibilityError: incompatible character encodings: US-ASCII and UTF-8
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/htmlgrid-1.2.2/lib/htmlgrid/template.rb:134:in `block in template_html'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/3.1.0/cgi/html.rb:55:in `nO_element'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/3.1.0/cgi/html.rb:62:in `nO_element_def'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/3.1.0/cgi/html.rb:423:in `html'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/htmlgrid-1.2.2/lib/htmlgrid/template.rb:133:in `template_html'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/htmlgrid-1.2.2/lib/htmlgrid/template.rb:149:in `to_html'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/sbsm-1.6.0/lib/sbsm/state.rb:175:in `to_html'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/sbsm-1.6.0/lib/sbsm/session.rb:547:in `to_html'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/sbsm-1.6.0/lib/sbsm/session.rb:279:in `block in process_rack'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/sbsm-1.6.0/lib/sbsm/session.rb:209:in `synchronize'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/sbsm-1.6.0/lib/sbsm/session.rb:209:in `process_rack'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/sbsm-1.6.0/lib/sbsm/app.rb:126:in `call'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/lint.rb:50:in `_call'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/lint.rb:38:in `call'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/show_exceptions.rb:23:in `call'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/content_length.rb:17:in `call'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/static.rb:161:in `call'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/tempfile_reaper.rb:15:in `call'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/tempfile_reaper.rb:15:in `call'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/tempfile_reaper.rb:15:in `call'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/lint.rb:50:in `_call'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/lint.rb:38:in `call'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/show_exceptions.rb:23:in `call'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/content_length.rb:17:in `call'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/handler/webrick.rb:95:in `service'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webrick-1.7.0/lib/webrick/httpserver.rb:140:in `service'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webrick-1.7.0/lib/webrick/httpserver.rb:96:in `run'
	/home/zdavatz/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/webrick-1.7.0/lib/webrick/server.rb:310:in `block in start_thread'

Trying to reproduce it on oddb-ci2. Unable to reproduce it there. I think it is a problem of the apache setup. We should compare the apache setup with a host that works.

Problem was that the CSS for oekk doc/resources/oekk/oddb.css contained ISO-8859 characters Ö. Replacing the word to OEKK fixed the problem.

Port ydim to Ruby 3.2

First problem was that ypdf-writer did not work under Ruby 3.x.

Remarked that no tests were run on github. There commited Added GithubActions.

Then there were some problems with missing gems like rexml and rmagich, which required changing the Gemfile. Also the test for generating a PDF was using the open shell command. This was replaced by using pdfinfo from poppler-utils. Committed with Fix dependencies and spec tests for ruby 3.x

Avoided warnings show in github action with commit Avoid warnings by using actions@v3

After Zeno installed rust on oddb-ci2 ruby 3.2.0 was build without any problem using the following script Attach:gen_ruby_320 by adding --enable-yjit to the call to ./configure.

Some corrections via commits

Making ydim compile and pass the unit tests under Ruby 3.2 needed the following commits

To install it I had to set bundle config build.pg --with-pg-config=/usr/local/pg-10_1/bin/pg_config before calling bundle install TODO: Upgraded ydim version

Updated Gemfile in ydim-html. Was unable to make the test run, but I think they never did run correcty.

Testing ydim is done like this (after modifying in the Gefile like this gem "ydim", :path => '/home/niklaus/git/ydim'

cd /var/wwww/ydim.ywesee.com
bundle-320 exec ruby-320 /home/niklaus/git/ydim/bin/ydimd config=/etc/ydim/ydimd.yml

and starting ydim-html like this

 
cd /var/wwww/ydim.ywesee.com
sudo -u apache /usr/local/bin/bundle-320 exec rackup

Had to remove two calls to url.untaint, which is no longer supported by Ruby 3.2, see https://bugs.ruby-lang.org/issues/16131 "Remove $SAFE, taint and trust". Pushed the commits Updates for ruby 3.2 and Bumped version to 1.1.2 and called bundle exec rake release

Looked at https://dev.ywesee.com/Niklaus/20180115-ydim-html-rack, updated the run configurations under the example_site/services to use ruby 3.2.

Pushed the following commits

I was unable to make the spec tests pass.

Some more commits to fix problem because rackup is now a seperate gem. Also is is no longer possible to set a default port in the config.ru

view · edit · sidebar · attach · print · history
Page last modified on January 04, 2023, at 01:36 PM