rgeo/activerecord-postgis-adapter

JRuby support

Closed this issue · 4 comments

In the README it is stated that JRuby is not supported because jruby's ActiveRecord adapter does not support 4.2 yet. But now it does, I think.

I tried running the test suite against jruby 9.0.3.0 and I only got two failures.

deivid@pantani ~/code/activerecord-postgis-adapter $ chruby jruby
deivid@pantani ~/code/activerecord-postgis-adapter $ bundle exec rake appraisal
uri:classloader:/jruby/kernel/kernel.rb:17: warning: unsupported exec option: close_others
uri:classloader:/jruby/kernel/kernel.rb:17: warning: unsupported exec option: close_others
>> BUNDLE_GEMFILE=/home/deivid/code/activerecord-postgis-adapter/gemfiles/ar42.gemfile bundle exec rake
uri:classloader:/jruby/kernel/kernel.rb:17: warning: unsupported exec option: close_others
Run options: --seed 23018

# Running:

...............................E.......F..................

Fabulous run in 15.514597s, 3.7384 runs/s, 10.6996 assertions/s.

  1) Error:
NestedClassTest#test_nested_model:
NoMethodError: undefined method `result_status' for 0:Fixnum
    /home/deivid/code/activerecord-postgis-adapter/test/nested_class_test.rb:18:in `test_nested_model'


  2) Failure:
DDLTest#test_column_defaults [/home/deivid/code/activerecord-postgis-adapter/test/ddl_test.rb:266]:
Expected: "-1"
  Actual: -1

58 runs, 166 assertions, 1 failures, 1 errors, 0 skips
rake aborted!
Command failed with status (1): [ruby -I"lib:test" -I"/home/deivid/.gem/jruby/2.2.2/gems/rake-10.4.2/lib" "/home/deivid/.gem/jruby/2.2.2/gems/rake-10.4.2/lib/rake/rake_test_loader.rb" "test/**/*_test.rb" ]

Tasks: TOP => default => test
(See full trace by running task with --trace)

They seem naively like easy fixes. Maybe someone with more knowledge can have a look?

/cc @teeparham @kares

Also JRuby team confirmed that AR-JDBC not supporting 4.2 yet. is no longer true as stated in README.

Thanks @deivid-rodriguez & @vjdhama for looking into this. It looks like we can get JRuby working soon! PRs are welcome, or I'll take a look when I have time.

I updated the readme to say JRuby is coming soon: a4638ac

Fixed by #199