Open AlexWayfer opened 1 year ago
Facing similar issue for mysql adapter : When can we expect activerecord-jdbcmysql-adapter to support rails 7.1?
JRuby 9.4.5.0, ActiveRecord 7.1.0, activerecord-jdbcmysql-adapter 70.1.
Uncaught exception: wrong number of arguments (given 4, expected 1..3)
/home/sam/Projects/SDKs/jruby-9.4.3.0/lib/ruby/gems/shared/gems/activerecord-jdbc-adapter-70.1-java/lib/arjdbc/abstract/core.rb:13:in `initialize' /home/sam/Projects/SDKs/jruby-9.4.3.0/lib/ruby/gems/shared/gems/userstamper-4.1.0/lib/userstamper/stampable.rb:22:in columns' /home/sam/Projects/SDKs/jruby-9.4.3.0/lib/ruby/gems/shared/gems/activerecord-7.1.1/lib/active_record/model_schema.rb:503:in column_names' /home/sam/Projects/SDKs/jruby-9.4.3.0/lib/ruby/gems/shared/gems/userstamper-4.1.0/lib/userstamper/utilities.rb:30:in available_association_columns' /home/sam/Projects/SDKs/jruby-9.4.3.0/lib/ruby/gems/shared/gems/userstamper-4.1.0/lib/userstamper/stampable.rb:69:in add_userstamp_associations' /home/sam/Projects/SDKs/jruby-9.4.3.0/lib/ruby/gems/shared/gems/userstamper-4.1.0/lib/userstamper/stampable.rb:39:in stampable' /home/sam/Projects/awetest/app/models/regression_test/job.rb:14:in class:Job' /home/sam/Projects/awetest/app/models/regression_test/job.rb:3:in
A year later, I have the opposite problem. I get this error:
23:40:20 web.1 | ArgumentError (wrong number of arguments (given 1, expected 4)):
23:40:20 web.1 |
23:40:20 web.1 | activerecord-jdbc-adapter-70.2 (java) lib/arjdbc/sqlite3/adapter.rb:92:in `initialize'
23:40:20 web.1 | activerecord-jdbc-adapter-70.2 (java) lib/arjdbc/abstract/statement_cache.rb:23:in `initialize'
23:40:20 web.1 | org/jruby/RubyClass.java:922:in `new'
23:40:20 web.1 | activerecord (7.2.1) lib/active_record/database_configurations/database_config.rb:26:in `new_connection'
My Gemfile contains:
IS_JRUBY = (defined? JRUBY_VERSION)
if IS_JRUBY
ruby '3.1.4'
gem 'activerecord-jdbc-adapter'
gem 'jdbc-sqlite3'
else
ruby "3.3.4"
gem 'sqlite3', '>= 2.0.4', '~> 2.0'
end
My Gemfile.lock contains:
activerecord (7.2.1)
activerecord-jdbc-adapter (70.2-java)
jdbc-sqlite3 (3.42.0.0)
UPDATE: I have reverted to using Postgres so I no longer need an answer, but I will leave this here for informational purposes.
@keithrbennett your problem is mostly due to the fact we do not support Rails 7.2. The thing we are not communicating well is that 70.x is Rails 7.0.x and when we support Rails 7.2 you will see a version 72.x come out for the adapters. It is good that postgresql is working but that is somewhat surprising since we have a lot of fixes coming in for 7.1 support. It is possible Rails 7.2 reverted something significant and the 70.x gems happen to work?
@enebo Thanks for your reply. Sorry I didn't explain that clearly. It's not that Postgres works with Rails 7.2, it's just that I only tried to get it to work with Sqlite. This is a web site running on C Ruby in production, but I was hoping to make it JRuby compatible. I will defer that with Postgres until a future time.
I saw similar issues, but
sqlite3
adapter seems to not be updated for years.JRuby 9.4.3.0, ActiveRecord 7.0.7,
activerecord-jdbcsqlite3-adapter
70.1.