activerecord-hackery/polyamorous

Can't "prepend" under JRuby 1.7

HoneyryderChuck opened this issue · 10 comments

Concerns these lines:

https://github.com/activerecord-hackery/polyamorous/blob/master/lib/polyamorous.rb#L39-L42

If I run an app with jruby in mode 2.0, this condition will be evaluated, but jruby doesn't support the prepend option.

As much as this is not a problem of yours (JRuby apparently decided not to support it until the 9000 release), it still cripples my usage of the ransack gem.

Did you ever experience this yourself? Workaround suggestion? Or could the extra jruby condition added without problems? I see your travis.yml is not taking jruby into account, is this by design?

radar commented

My only work around solution is to not use Jruby.

On 20 Jul 2015, at 20:39, Tiago notifications@github.com wrote:

Concerns these lines:

https://github.com/activerecord-hackery/polyamorous/blob/master/lib/polyamorous.rb#L39-L42

If I run an app with jruby in mode 2.0, this condition will be evaluated, but jruby doesn't support the prepend option.

As much as this is not a problem of yours (JRuby apparently decided not to support it until the 9000 release), it still cripples my usage of the ransack gem.

Did you ever experience this yourself? Workaround suggestion? Or could the extra jruby condition added without problems? I see your travis.yml is not taking jruby into account, is this by design?


Reply to this email directly or view it on GitHub.

that'd be a 👎 for me :) So this gem doesn't support JRuby officially? I'd suggest then some info in the readme page and a condition on install/require.

@TiagoCardoso1983 Why not submit a PR fix instead?

As you can see in the .travis.yml file, we've been testing with MRI Rubies only, up until now.

Prepend is a recent change, so you could also use an earlier version of Ransack or Polyamorous.

I actually did something else: I upgraded JRuby to 9.0.0.0.rc2 and it worked (2.2 compatibility). It's not really your gem's fault, just that 2.0 support in 1.7.x versions is quite experimental.

Yup, the idea of this issue was exactly to know whether JRuby support would be something you'd be interested in, and then I'd PR it. It's not a light decision IMO, as subsequent features will have to be tested against it all the time.

Great. I'm interested in trying out JRuby 9 sometime to compare it with MRI 2.2 and 2.3 head. If compat with earlier JRubies would be just a matter of detecting the Ruby + version in polyamorous.rb and adding it to .travis.yml that might be worthwhile.

radar commented

Use JRuby 9 then if you want compatibility.

On 23 Jul 2015, at 04:32, Jon Atack notifications@github.com wrote:

JRuby 9 released today.


Reply to this email directly or view it on GitHub.

Yes. Closing for now.