rsim / oracle-enhanced

Oracle enhaced adapter for ActiveRecord
MIT License
549 stars 311 forks source link

Attempting to fix jRuby issues with v7.0.1+ #2356

Closed redconfetti closed 11 months ago

redconfetti commented 11 months ago

See issue #2350

redconfetti commented 11 months ago

I was attempting to see if TravisCI could point out what is occurring when the gem is installed. It didn't seem to work, resulting in some test failures, of which I'm not sure why they're occurring.

I realized I could make it work by specifying the Git SHA in my Gemfile like so for v7.0.1:

git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "activerecord-oracle_enhanced-adapter", github: "rsim/oracle-enhanced", ref: 'ba22ee6333'
redconfetti commented 11 months ago

Even with my work-around I'm getting an error in TravisCI

Setting environment variables from .travis.yml
$ export JRUBY_OPTS="--dev -J-Xmx900m"
$ export DISPLAY=:99.0
$ export LOGGER_LEVEL=WARN
$ export TRAVIS_NODE_VERSION="8"
rvm
106.04s$ rvm use jruby-9.4.5.0 --install --binary --fuzzy
$ export BUNDLE_GEMFILE=$PWD/Gemfile
cache.1
Setting up build cache
ruby.versions
$ java -Xmx32m -version
before_install.1
2.87s$ bundle config set --local path 'vendor/bundle'
before_install.2
2.91s$ bundle config set --local deployment 'true'
before_install.3
2.88s$ bundle config set --local without 'development production'
before_install.4
12.11s$ gem update --system 3.3.22
before_install.5
3.84s$ gem --version
before_install.6
15.91s$ gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
before_install.7
5.80s$ gem install bundler -v '2.3.22'
27.48s$ bundle install --jobs=4 --retry=5
Fetching gem metadata from https://rubygems.org/.........
Fetching https://github.com/rsim/oracle-enhanced.git
[!] There was an error while loading `activerecord-oracle_enhanced-adapter.gemspec`: no such file to load -- rake. Bundler cannot continue.
 #  from /home/travis/build/sis-berkeley-edu/cal-central/vendor/bundle/jruby/3.1.0/bundler/gems/oracle-enhanced-1ad893df4f3c/activerecord-oracle_enhanced-adapter.gemspec:3
 #  -------------------------------------------
 #  
 >  require "rake"
 #  
 #  -------------------------------------------
The command "eval bundle install --jobs=4 --retry=5 " failed. Retrying, 2 of 3.
Invalid gemspec in [/home/travis/build/sis-berkeley-edu/cal-central/vendor/bundle/jruby/3.1.0/bundler/gems/oracle-enhanced-1ad893df4f3c/activerecord-oracle_enhanced-adapter.gemspec]: no such file to load -- rake
--- ERROR REPORT TEMPLATE -------------------------------------------------------

NoMethodError: undefined method `name' for nil:NilClass
  /home/travis/.rvm/rubies/jruby-9.4.5.0/lib/ruby/stdlib/rubygems/stub_specification.rb:155:in `name'
  /home/travis/.rvm/gems/jruby-9.4.5.0/gems/bundler-2.3.22/lib/bundler/stub_specification.rb:7:in `from_stub'
  /home/travis/.rvm/gems/jruby-9.4.5.0/gems/bundler-2.3.22/lib/bundler/source/git.rb:338:in `load_gemspec'
  /home/travis/.rvm/gems/jruby-9.4.5.0/gems/bundler-2.3.22/lib/bundler/source/path.rb:177:in `block in load_spec_files'
  org/jruby/RubyArray.java:1989:in `each'
  /home/travis/.rvm/gems/jruby-9.4.5.0/gems/bundler-2.3.22/lib/bundler/source/path.rb:176:in `load_spec_files'
  /home/travis/.rvm/gems/jruby-9.4.5.0/gems/bundler-2.3.22/lib/bundler/source/git.rb:211:in `load_spec_files'
  /home/travis/.rvm/gems/jruby-9.4.5.0/gems/bundler-2.3.22/lib/bundler/source/path.rb:107:in `local_specs'
  /home/travis/.rvm/gems/jruby-9.4.5.0/gems/bundler-2.3.22/lib/bundler/source/git.rb:178:in `specs'
  /home/travis/.rvm/gems/jruby-9.4.5.0/gems/bundler-2.3.22/lib/bundler/lazy_specification.rb:82:in `materialize_for_installation'
  /home/travis/.rvm/gems/jruby-9.4.5.0/gems/bundler-2.3.22/lib/bundler/spec_set.rb:194:in `block in specs_for_dependency'
  org/jruby/RubyArray.java:2813:in `map'
  /home/travis/.rvm/gems/jruby-9.4.5.0/gems/bundler-2.3.22/lib/bundler/spec_set.rb:194:in `specs_for_dependency'
  /home/travis/.rvm/gems/jruby-9.4.5.0/gems/bundler-2.3.22/lib/bundler/spec_set.rb:33:in `block in for'
  org/jruby/RubyKernel.java:1603:in `loop'

Environment

Bundler       2.3.22
  Platforms   ruby, universal-java-17
Ruby          3.1.4p0 (2023-11-02 revision 1abae2700ffd6ddec93b661400c9744e9bb45eff) [universal-java-17]
  Full Path   /home/travis/.rvm/rubies/jruby-9.4.5.0/bin/jruby
  Config Dir  /home/travis/.rvm/rubies/jruby-9.4.5.0/etc
RubyGems      3.3.22
  Gem Home    /home/travis/build/sis-berkeley-edu/cal-central/vendor/bundle/jruby/3.1.0
  Gem Path    /home/travis/build/sis-berkeley-edu/cal-central/vendor/bundle/jruby/3.1.0
  User Home   /home/travis
  User Path   /home/travis/.gem/jruby/3.1.0
  Bin Dir     /home/travis/build/sis-berkeley-edu/cal-central/vendor/bundle/jruby/3.1.0/bin
OpenSSL       
  Compiled    JRuby-OpenSSL 0.14.2
  Loaded      JRuby-OpenSSL 0.14.2
  Cert File   /usr/lib/jvm/bellsoft-java17-amd64/lib/security/cacerts
  Cert Dir    /etc/ssl/certs
Tools         
  Git         2.40.1
  RVM         1.29.12 (latest)
  rbenv       rbenv 1.2.0-64-gaf9201e
  chruby      not installed

Bundler Build Metadata

Built At          2022-09-07
Git SHA           44fb4c9ef5
Released Version  true

I'm going to try put out some effort to get this working, at least for myself.