Closed aaronkelton closed 4 years ago
Hi @chemturion
I dug into this a little bit but I'm not able to find any references to pry either so I'm not sure. The one thing I noticed is that it says its calling require on line 1 in jdbc_overrides.rb
but there isn't a require line in that file. Is it possible that its loading a modified version of that file on your system?
Hi @rdubya I think you're on the right trail. On my local I found this with the require 'pry'
statement on line 1.
# C:\projects\my_app\vendor\jruby\2.5.0\gems\activerecord-jdbcsqlserver-adapter-51.0.0\lib\active_record\connection_adapters\sqlserver\jdbc_overrides.rb
require 'pry'
module ActiveRecord
module ConnectionAdapters
module SQLServer
module JDBCOverrides
# etc.
I then did a fresh gem install activerecord-jdbcsqlserver-adapter
to see what I would get from Ruby Gems. I confirmed the install location using gem env
gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.7.10
- RUBY VERSION: 2.5.7 (2019-10-30 patchlevel 0) [java]
- INSTALLATION DIRECTORY: C:/jruby-9.2.9.0/lib/ruby/gems/shared
and looked inside the jdbc_overrides.rb
file freshly installed on my machine.
# C:\jruby-9.2.9.0\lib\ruby\gems\shared\gems\activerecord-jdbcsqlserver-adapter-51.0.0\lib\active_record\connection_adapters\sqlserver\jdbc_overrides.rb
require 'pry'
module ActiveRecord
module ConnectionAdapters
module SQLServer
module JDBCOverrides
# etc.
Is it possible that the 51.0.0 version uploaded to Ruby Gems differs from the one here on GitHub (5-1-stable-jdbc branch)?
@chemturion @rdubya I can confirm installing 51.0.0 jdbc_overrides.rb does in fact have a require 'pry' as the first line (installed the gem on my linux box so I never have installed it here ).
An obvious workaround would be to comment out the require, but looking through history of that file there has NEVER been a require there. Is something adding it as part of a post-install hook or something like that? Or gem release happened to have an uncommitted change when building the gem?
@enebo good call. It probably was there when I built the gem. I'll try to get that fixed up and release a 51.0.1 version
Ok 51.0.1 is up, can you try it and make sure it works now?
Thank you for the minor bump. Working now. 👍
Hi 👋 upgrading to Rails 5 here; squashed a lot of bugs to get a successful WAR file built, and upon deployment I'm seeing this Internal Server Error page with message
You're seeing this error because you use JRuby::Rack::ErrorApp::ShowStatus.
. Stack trace formatted below.The thing is,
pry
in my Gemfile is in the development and test group, so I'm not sure why it's being loaded in the first place, or what specifically insidejdbc_overrides.rb
is requiringpry
(because that's the next-to-last line on top before the "no such file" statement). I did some source diving to see what the problem could be, but no luck.I'm using JRuby 9.2.9.0, Bundler 1.17.3, and Warbler 2.0.5. If it's not a
jdbcsqlserver
issue, my next guess is Warbler, or maybe there's another knob I need to turn in my own configuration. I'll start going thru Warbler docs in depth, but in the meantime, does this look like a bug insidejdbc_overrides.rb
by chance?