Question

I got an issue with JRuby, the backtraces are less pertinent than 1.9.3, for example :

In jruby-1.6.8

[1] pry(main)> a = Task.create(title:"Test")
ArgumentError: wrong number of arguments (2 for 0)
from /Users/salta/.rvm/gems/jruby-1.6.8/gems/mongoid-3.0.6/lib/mongoid/persistence.rb:230:in `create'

In ruby-1.9.3-p194

[1] pry(main)> a = Task.create(title:"Test")
ArgumentError: wrong number of arguments (2 for 0)
from /Users/salta/apps/asabo/app/models/task.rb:17:in `initialize'

The real issue comes from /Users/salta/apps/asabo/app/models/task.rb:17 not /Users/salta/.rvm/gems/jruby-1.6.8/gems/mongoid-3.0.6/lib/mongoid/persistence.rb:230

Do you know a work around or is it someting we have to cope with?

Thank You!

Using :

  • Mac OS X 10.8.2
  • rvm 1.16.6
  • jruby-1.6.8 (1.9 Branch)
  • ruby-1.9.3-p194
Was it helpful?

Solution

I would recommend filing this as a JRuby bug if it is still present in JRuby 1.7. You can do that either at our JIRA tracker http://bugs.jruby.org or at our Github repository https://github.com/jruby/jruby .

It does look like it could be a bug to me, but we need more details.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top