Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Startup problem with Ruby 3.3 #241

Open
ngiger opened this issue Jan 31, 2024 · 3 comments
Open

Startup problem with Ruby 3.3 #241

ngiger opened this issue Jan 31, 2024 · 3 comments

Comments

@ngiger
Copy link
Collaborator

ngiger commented Jan 31, 2024

In order to get fast a reliable environment for oddb developers I documented my use https://devenv.sh/ in
https://github.com/ngiger/oddb.org/blob/master/devenv.README.md
This allowed me to fix the few issues when moving to ruby 3.3 and testing them via unit test for the involved components like odba, sbsm, htmlgrid, ydbi, yus, migel and oddb.org.
Big drawback for this setup is that NixOS only provides builds for postgres 12 upto 16. Starting under Postgres 16 breaks at the line in src/util/oddb_app.rb with the content@system = ODBA.cache.fetch_named('oddbapp', self){ OddbPrevalence.new }.
I have not digged further into this problem, but it could be related to the fact that table no longer are able to contain columns named OID.
But ch.oddb.org (and my test installation oddb-ci2) runs with postgres 10.
Therefore I installed ruby-3.3 on oddb-ci2 and pulled all my changes from https://github.com/ngiger/oddb.org. I am starting the service manually sudo -u apache bundle-330 exec rackup --host 192.168.0.75 -p 8012 --quiet. The service startup up without any apparent failure but when I visit with my browser http://192.168.0.75:8012/ I see the error message

Internal Server Error
wrong number of arguments (given 2, expected 1)
WEBrick/1.8.1 (Ruby/3.3.0/2023-12-25) at 192.168.0.75:8012 

and in the console I see

[2024-01-31 17:54:32] INFO  WEBrick::HTTPServer#start: pid=18888 port=8012
preferences_navigation / ODDB::State::User::Preferences
192.168.0.160 - - [31/Jan/2024:17:54:36 +0100] "GET http://192.168.0.75:8012/" 200 -
[2024-01-31 17:54:36] ERROR ArgumentError: wrong number of arguments (given 2, expected 1)
        /var/www/oddb.org/vendor/bundle/ruby/3.3.0/gems/rack-3.0.8/lib/rack/body_proxy.rb:18:in `respond_to?'
        /var/www/oddb.org/vendor/bundle/ruby/3.3.0/gems/rack-3.0.8/lib/rack/body_proxy.rb:18:in `respond_to_missing?'
        /var/www/oddb.org/vendor/bundle/ruby/3.3.0/gems/rack-3.0.8/lib/rack/lint.rb:828:in `respond_to?'
        /var/www/oddb.org/vendor/bundle/ruby/3.3.0/gems/rack-3.0.8/lib/rack/lint.rb:828:in `respond_to?'
        /var/www/oddb.org/vendor/bundle/ruby/3.3.0/gems/rackup-2.1.0/lib/rackup/handler/webrick.rb:118:in `service'
        /var/www/oddb.org/vendor/bundle/ruby/3.3.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:140:in `service'
        /var/www/oddb.org/vendor/bundle/ruby/3.3.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:96:in `run'
        /var/www/oddb.org/vendor/bundle/ruby/3.3.0/gems/webrick-1.8.1/lib/webrick/server.rb:310:in `block in start_thread'

I have no idea, why I get into this error

@zdavatz
Copy link
Owner

zdavatz commented Jan 31, 2024

https://stackoverflow.com/questions/65469682/argumenterror-wrong-number-of-arguments-given-2-expected-1-after-updating-t

So, the fix I can see is to explicitely passing the parameters to the method:

@zdavatz
Copy link
Owner

zdavatz commented Feb 1, 2024

it works for me:
latest-screenshot

@zdavatz
Copy link
Owner

zdavatz commented Feb 2, 2024

Do you receive any HTTP headers?

latest-screenshot

ngiger added a commit to ngiger/oddb.org that referenced this issue Feb 8, 2024
ngiger added a commit to ngiger/oddb.org that referenced this issue Feb 8, 2024
ngiger added a commit to ngiger/oddb.org that referenced this issue Feb 8, 2024
zdavatz added a commit that referenced this issue Feb 8, 2024
(#241): Fix and test for exfactory and public prices
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants