-
Notifications
You must be signed in to change notification settings - Fork 386
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
activerecord-jdbcsqlite3-adapter v61.1 is not working with activerecord v6.1.5 #1106
Comments
Using JRuby 9.3.4.0 on Windows 7 SP1, with the same versions of the gems, I get the same error from IRB that @AndyObtiva did. I then manually applied the pull request from @terencechow #1096 which resolved the error:
|
@headius is there any chance the PR @rubycoder mentioned could be merged sometime soon? This gem is the main library used in Glimmer DSL for SWT desktop apps for including a SQLite database with ActiveRecord. I realize that users could revert to an older working version as a workaround, but it’s a shame they could not use the latest version reliably. I have been asked by someone to provide a blog post tutorial on how to integrate SQLite and ActiveRecord with a Glimmer DSL for SWT desktop app. But, this issue is a blocker. |
@AndyObtiva We can release a fix and this PR is fine but do you know if this happened during a point release of 6.1? Or perhaps Rails itself somehow creates connections using a different call? The PR itself will gracefully go back to older constant so I should not be too concerned about this but I am just trying to figure out why this is broken for 6.1.5. |
Actually #1095 Gives a reasonable explanation but I checked back and for 9.3.4.0 I ran 6.1.3.2 (don't ask) as a full rails app using sqlite3 and it runs using rails commands. I am wondering how rails bootstraps vs it being called directly. As I said we will fix this so people can call establish connection directly but I am hoping to understand this a little more. |
I tried creating a new rails 6.1.5 app (not 6.1.3.2) under jruby-9.3.3.0 ARM64 M1 Chip Mac, and I got a different error during generation of the app, which prevented me to go as far as testing the rails commands for SQLite and ActiveRecord:
That issue probably oughta get addressed too. It seems that they hardcoded a C dependency for a gem (sass-rails) that is usable in JRuby too, which is the cause of the issue. I just reported that issue over here in case it is a serious one and not just a user error though if I'm wrong, I'd be happy to stand corrected: rails/sass-rails#447 |
I just added a note to my last comment about the fact that I am using a Mac M1 Chip ARM64 CPU architecture.
That might be related to this last error. I noted it on the opened issue on the sass-rails project too. |
@AndyObtiva yeah that is something I am not seeing but it has to be related to M1 and how sassc is specified. I have released 61.2 which applied #1096. So you should be able to establish_connection in the way you wrote above. Rails must have some additional magic which is unclear to me but I can run Rails itself before or after the PR. I personally like that the PR limits the range of this special require behavior. I will apologize on all three issues/prs that this got lost in the fog. Thanks for pinging us again. |
I just confirmed that I could install and build a Rails 6.1.5 app in JRuby 9.3.3.0 just fine on an Intel Mac machine, so the issue that I reported at sass-rails is limited to M1 Chip Macs (ARM64) only. Thank you @enebo for the release. I just tested it and confirmed it resolves the issue. |
The arch issue should be fixed in JRuby 9.3.4.0. there was a set of changes there to correct the arch flag to be arm64 on MacOS. |
I confirm that the sass-rails issue was fixed in JRuby 9.3.4.0 That said, I got another issue when running
I tried running
These might be ARM64 (AARCH64) related issues. I'm at work right now, so I couldn't spend more time on this, but when I get home, I'll try the same commands on my Intel Mac to see if I get an issue there in JRuby 9.3.4.0. |
I just tried installing Rails 6.1.5 in JRuby 9.3.4.0 on my Intel Mac, creating a new app, starting the server, and creating the database, and it all worked, just like JRuby 9.3.3.0 on the Intel Mac. |
I just documented the newly discovered ARM64 Mac issue in a separate GitHub issue: Otherwise, thanks again for resolving this GitHub issue. |
jruby -v
uname -a
My gem versions are:
When I run the following code in IRB:
I get the following output and error:
I even tried to add the following 2 extra lines to the code (line 2 and 3), but to no avail:
The original code above used to work with older versions of activerecord (5.2.4.3) and activerecord-jdbcsqlite3-adapter (52.6). I am not sure if I am perhaps mixing the wrong version combinations of the two gems.
Help is appreciated!
The text was updated successfully, but these errors were encountered: