Skip to content

Fix using gem from local and basic raw prepared statement with Time.current (active Support time with zone) #1170

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

Merged
merged 3 commits into from
Feb 28, 2025

Conversation

JesseChavez
Copy link
Contributor

Hi @enebo

These fix are kind of important for a common scenarios

  1. Use gem from source
platforms :jruby do
  gem 'activerecord-jdbc-adapter', path: '../../vendor_gems/activerecord-jdbc-adapter'
  # gem "activerecord-jdbc-alt-adapter", "~> 72.0.0.rc1"
  gem "jdbc-pgsql"
end
  1. basic query with hardcoded prepared statement

Before Rails 7.2 queries with where('updated_at < ?', Time.current) used to be interpolated in AR guts now in Rails 7.2 they pass as part of the prepared statement

without this for some reason, rails thinks it needs CRuby gems such
as pg gem, etc.
@enebo enebo merged commit c56c7b4 into jruby:master Feb 28, 2025
7 of 12 checks passed
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

Successfully merging this pull request may close these issues.

2 participants