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

FixNum related error for pooling.rb #16

Open
charliebabbitt1988 opened this issue Jun 28, 2024 · 0 comments
Open

FixNum related error for pooling.rb #16

charliebabbitt1988 opened this issue Jun 28, 2024 · 0 comments

Comments

@charliebabbitt1988
Copy link

charliebabbitt1988 commented Jun 28, 2024

Blue Hydra won't launch with Ruby 3.2.3. Here is what I see in the blue_hydra.log file:

E, [2024-06-28T18:26:49.524571 #16435] ERROR -- : NameError: uninitialized constant DataObjects::Pooling::Pool::Fixnum
E, [2024-06-28T18:26:49.524669 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/data_objects-0.10.17/lib/data_objects/pooling.rb:149:in initialize' E, [2024-06-28T18:26:49.524681 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/data_objects-0.10.17/lib/data_objects/pooling.rb:121:in new'
E, [2024-06-28T18:26:49.524689 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/data_objects-0.10.17/lib/data_objects/pooling.rb:121:in block in new' E, [2024-06-28T18:26:49.524696 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/data_objects-0.10.17/lib/data_objects/pooling.rb:121:in synchronize'
E, [2024-06-28T18:26:49.524703 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/data_objects-0.10.17/lib/data_objects/pooling.rb:121:in new' E, [2024-06-28T18:26:49.524710 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/data_objects-0.10.17/lib/data_objects/connection.rb:68:in new'
E, [2024-06-28T18:26:49.524717 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:251:in open_connection' E, [2024-06-28T18:26:49.524723 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:276:in with_connection'
E, [2024-06-28T18:26:49.524731 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:33:in select' E, [2024-06-28T18:26:49.524738 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/dm-migrations-1.2.0/lib/dm-migrations/adapters/dm-sqlite-adapter.rb:43:in table_info'
E, [2024-06-28T18:26:49.524744 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/dm-migrations-1.2.0/lib/dm-migrations/adapters/dm-sqlite-adapter.rb:18:in storage_exists?' E, [2024-06-28T18:26:49.524751 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/dm-migrations-1.2.0/lib/dm-migrations/adapters/dm-do-adapter.rb:90:in create_model_storage'
E, [2024-06-28T18:26:49.524798 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/dm-migrations-1.2.0/lib/dm-migrations/adapters/dm-do-adapter.rb:57:in upgrade_model_storage' E, [2024-06-28T18:26:49.524805 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/dm-migrations-1.2.0/lib/dm-migrations/auto_migration.rb:73:in upgrade_model_storage'
E, [2024-06-28T18:26:49.524812 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/dm-migrations-1.2.0/lib/dm-migrations/auto_migration.rb:145:in auto_upgrade!' E, [2024-06-28T18:26:49.524819 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/dm-migrations-1.2.0/lib/dm-migrations/auto_migration.rb:47:in block in repository_execute'
E, [2024-06-28T18:26:49.524825 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/dm-core-1.2.1/lib/dm-core/support/descendant_set.rb:64:in block in each' E, [2024-06-28T18:26:49.524831 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/dm-core-1.2.1/lib/dm-core/support/subject_set.rb:211:in block in each'
E, [2024-06-28T18:26:49.524838 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/dm-core-1.2.1/lib/dm-core/support/ordered_set.rb:320:in block in each' E, [2024-06-28T18:26:49.524844 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/dm-core-1.2.1/lib/dm-core/support/ordered_set.rb:320:in each'
E, [2024-06-28T18:26:49.524850 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/dm-core-1.2.1/lib/dm-core/support/ordered_set.rb:320:in each' E, [2024-06-28T18:26:49.524858 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/dm-core-1.2.1/lib/dm-core/support/subject_set.rb:211:in each'
E, [2024-06-28T18:26:49.524865 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/dm-core-1.2.1/lib/dm-core/support/descendant_set.rb:63:in each' E, [2024-06-28T18:26:49.524871 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/dm-migrations-1.2.0/lib/dm-migrations/auto_migration.rb:46:in repository_execute'
E, [2024-06-28T18:26:49.524877 #16435] ERROR -- : /var/lib/gems/3.2.0/gems/dm-migrations-1.2.0/lib/dm-migrations/auto_migration.rb:27:in auto_upgrade!' E, [2024-06-28T18:26:49.524884 #16435] ERROR -- : /root/blue_hydra/lib/blue_hydra.rb:400:in <top (required)>'
E, [2024-06-28T18:26:49.524898 #16435] ERROR -- : internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:86:in require' E, [2024-06-28T18:26:49.524905 #16435] ERROR -- : <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:86:in require'
E, [2024-06-28T18:26:49.524912 #16435] ERROR -- : ./bin/blue_hydra:61:in `

'

I'm not sure if you can re-produce this, but this is occurring on a brand new Ubuntu 24.04 LTS desktop install.

"ruby -v" shows this: ruby 3.2.3 (2024-01-18 revision 52bb2ac0a6) [x86_64-linux-gnu]

I'm not sure how to address this one as it seems to be a Ruby issue. From what I have been able to gather, the use of "FixNum" has been deprecated since Ruby 2.4 and "Integer" has replaced "FixNum" and "BigNum".

I could "patch" the pooling.rb file to use "Integer" instead of "FixNum", but that doesn't seem like a good long term solution.

Edited: I was able to work around this by editing the /var/lib/gems/3.2.0/gems/data_objects-0.10.17/lib/data_objects/pooling.rb file and changing line 149 to use "Integer" instead of "FixNum". Blue Hydra now launches and runs successfully.

This is the line now (starting at line 148):

      def initialize(max_size, resource, args)
         raise ArgumentError.new("+max_size+ should be a Integer but was #{max_size.inspect}") unless Integer === max_size
         raise ArgumentError.new("+resource+ should be a Class but was #{resource.inspect}") unless Class === resource

So this seems to be a Ruby gem issue with Ruby 3.2. Maybe a bug report should be filed to the Ruby developers?

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

1 participant