Created attachment 237607 [details] Patch views/layout.haml to work with haml 6 oxidized fails to start if using oxidized-web, with latest ports tree (rubygem-haml-6.0.5). This patch updates dependency on haml to allow 6.0 and patches views/layout.haml because of changes between haml 5 -> 6.
Created attachment 237608 [details] patch gemspec to change dependency on haml, to work with 6.x
Hi, thanks for the patch, could reanimate oxidized. Unfortunately there seems to be another new problem with diff representation. NoMethodError at /node/version/diffs undefined method `escape_once' for #<Oxidized::API::WebApp:0x000000087f282a58 @default_layout=:layout, @preferred_extension="haml", @app=nil, @template_cache=#<Tilt::Cache:0x000000084d4d5350 @cache={[:haml, :diffs, {:outvar=>"@_out_buf", :default_encoding=>"utf-8"}, "/usr/local/lib/ruby/gems/3.0/gems/oxidized-web-0.13.1/lib/oxidized/web/views"]=>#<Haml::Template:0x00000008367c6da0 @options={:outvar=>"@_out_buf"}, @line=1, @file="/usr/local/lib/ruby/gems/3.0/gems/oxidized-web-0.13.1/lib/oxidized/web/views/diffs.haml", @compiled_method={[Oxidized::API::WebApp, []]=>#<UnboundMethod: Tilt::CompiledTemplates#__tilt_3940(locals) /usr/local/lib/ruby/gems/3.0/gems/oxidized-web-0.13.1/lib/oxidized/web/views/diffs.haml:-2>},
(In reply to Sigi from comment #2) Sorry, i am a ruby noob, but after some google sessions i simply changed all references from "escape_once" to "escape_html" in diff.haml and version.haml This does the job for me. Seems to be a Ruby3 thing. Only a reference for other people hitting same issue.
I'm removing maintainer feedback approval on this patch. Can you submit a patch to change the gemspec to use www/rubygem-haml5? oxidized probably won't work on ruby3 yet.
(In reply to Nick Hilliard from comment #4) oxidized 44291 0.0 0.0 12848 2504 - Ss Sat10 0:04.60 daemon: /usr/local/bin/oxidized[44292] (daemon) oxidized 44292 0.0 0.5 331348 81080 - S Sat10 2:02.75 ruby30: puma 5.6.5 (tcp://127.0.0.1:8888) [/] (ruby30) I think it runs under Ruby 3. I did nothing to force this. ll /usr/local/bin/ruby* lrwxr-xr-x 1 root wheel 6 Oct 6 15:09 /usr/local/bin/ruby -> ruby30 -rwxr-xr-x 1 root wheel 555 Aug 31 19:02 /usr/local/bin/ruby-parse -rwxr-xr-x 1 root wheel 559 Aug 31 19:02 /usr/local/bin/ruby-rewrite -rwxr-xr-x 1 root wheel 6304 Oct 6 15:44 /usr/local/bin/ruby27 -rwxr-xr-x 1 root wheel 6336 Oct 6 15:09 /usr/local/bin/ruby30 and 20220421: AFFECTS: users of lang/ruby27 AUTHOR: yasu@FreeBSD.org The default ruby version has been updated from 2.7 to 3.0. If you compile your own ports you may keep 2.7 as the default version by adding the following lines to your /etc/make.conf file: # # Keep ruby 2.7 as default version # DEFAULT_VERSIONS+=ruby=2.7
A work around if you need Oxidized running would be installing the gem under the Oxidized user with sudo -H -u oxidized gem install --user-install oxidized-web This works with ruby30. Of course this is an temporary solution
Created attachment 239927 [details] patch rubygem-oxidized-web 0.13.1_3 to 0.13.1_4 depending on rubygem-haml5 seems like a better option
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=ad243caa7fb4460a75f16457c90a9c0ddc7b166b commit ad243caa7fb4460a75f16457c90a9c0ddc7b166b Author: Nick Hilliard <nick@foobar.org> AuthorDate: 2023-02-05 20:33:29 +0000 Commit: Juraj Lutter <otis@FreeBSD.org> CommitDate: 2023-02-05 20:40:24 +0000 net-mgmt/rubygem-oxidized-web: Adjust dependencies (rubygem-haml5) Adjust dependency to proper rubygem-haml5 (as rubygem-haml is 6.x now). PR: 267327 net-mgmt/rubygem-oxidized-web/Makefile | 4 ++-- .../files/{patch-gemspec => patch-oxidized-web.gemspec} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
When I openeded the bug I completely missed that there was a rubygem-haml5 port added on 2022-10-09. Since upstream dormant, changing dependency to rubygem-haml5 seems the right solution. Any work to support newer versions of ruby or libraries should be worked on upstream. For myself, I stopped using oxidized-web. Instead, oxidized pushes commits to gitlab and that's all the UI I need (for now)
Committed the patch by Nick Hilliard.