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

NameError: uninitialized constant ActiveSupport::ArrayInquirer Did you mean? ActiveSupport::ArrayInquirer #4788

Open
cmthakur opened this Issue Sep 14, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@cmthakur

cmthakur commented Sep 14, 2017

Scenario
Recently we had switched to jRuby(jruby-9.1.7.0), but due to SSL handshake issues bug we upgrade java from 1.7x to 1.8.0_131. This leads to issue like "NameError: uninitialized constant ActiveSupport::ArrayInquirer Did you mean? ActiveSupport::ArrayInquirer".

Is this due to upgrade of java version or there any bug in jRuby itself?

Environment
Production

jRuby version:
jruby-9.1.7.0

OS:
Ubuntu 16.04.3 LTS

JAVA version:

openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)

Framework:
Rails 5.0.0.1 (api)

Application Server
Passenger Entreprise

@cmthakur cmthakur changed the title from uninitialized constant ActiveSupport::JSON Did you mean? ActiveSupport::JSON JSON to NameError: uninitialized constant ActiveSupport::ArrayInquirer Did you mean? ActiveSupport::ArrayInquirer Sep 14, 2017

@kares

This comment has been minimized.

Show comment
Hide comment
@kares

kares Sep 17, 2017

Member

please try latest on 9.1 (9.1.13 ATM) ... this is an auto-loading issue that might go away.
if it persist than try to eager load your application -> as (lazy) loading in multiple threads, without a GIL, will always have some (more or less visible) race conditions ...

Member

kares commented Sep 17, 2017

please try latest on 9.1 (9.1.13 ATM) ... this is an auto-loading issue that might go away.
if it persist than try to eager load your application -> as (lazy) loading in multiple threads, without a GIL, will always have some (more or less visible) race conditions ...

@cmthakur

This comment has been minimized.

Show comment
Hide comment
@cmthakur

cmthakur Sep 18, 2017

@kares The application is already configured to use eager load and it should be able to work with the threaded web server in my case passenger server.

config/environments/production.rb

  # Eager load code on boot. This eager loads most of Rails and
  # your application in memory, allowing both threaded web servers
  # and those relying on copy on write to perform better.
  # Rake tasks automatically ignore this option for performance.
  config.eager_load = true

Am I missing anything here, except upgrading jRuby to the latest version?

cmthakur commented Sep 18, 2017

@kares The application is already configured to use eager load and it should be able to work with the threaded web server in my case passenger server.

config/environments/production.rb

  # Eager load code on boot. This eager loads most of Rails and
  # your application in memory, allowing both threaded web servers
  # and those relying on copy on write to perform better.
  # Rake tasks automatically ignore this option for performance.
  config.eager_load = true

Am I missing anything here, except upgrading jRuby to the latest version?

@kares

This comment has been minimized.

Show comment
Hide comment
@kares

kares Sep 18, 2017

Member

nope, except maybe activerecord-jdbc-adapter not supporting Rails 5.x ... depends on particular adapter on how well it works. anyways just give upgrade a try and if the issue persist try to come up with a minimal reproducer piece.

Member

kares commented Sep 18, 2017

nope, except maybe activerecord-jdbc-adapter not supporting Rails 5.x ... depends on particular adapter on how well it works. anyways just give upgrade a try and if the issue persist try to come up with a minimal reproducer piece.

@kares

This comment has been minimized.

Show comment
Hide comment
@kares

kares Jun 20, 2018

Member

since there's finally some AR-JDBC 50.x releases, this should be re-evaluated using those (and latest 9.1)

Member

kares commented Jun 20, 2018

since there's finally some AR-JDBC 50.x releases, this should be re-evaluated using those (and latest 9.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment