I am running jruby 1.6.1 in ruby 1.9 mode and when i run this code:
require ‘active_resource’
class EmailAccount < ActiveResource::Base
self.site=“http://localhost:3000”
end
EmailAccount.find(23)
I get:
ArgumentError: wrong number of arguments (2 for 1)
from
/home/ubuntu/.rvm/rubies/jruby-1.6.1/lib/ruby/1.9/net/http.rb:886:in
get' from /home/ubuntu/.rvm/rubies/jruby-1.6.1/lib/ruby/1.9/net/http.rb:1186:in
transport_request’
from
/home/ubuntu/.rvm/rubies/jruby-1.6.1/lib/ruby/1.9/net/http.rb:2334:in
reading_body' from /home/ubuntu/.rvm/rubies/jruby-1.6.1/lib/ruby/1.9/net/http.rb:1185:in
transport_request’
from
/home/ubuntu/.rvm/rubies/jruby-1.6.1/lib/ruby/1.9/net/http.rb:1169:in
request' from /home/ubuntu/.rvm/rubies/jruby-1.6.1/lib/ruby/1.9/net/http.rb:1162:in
request’
from
/home/ubuntu/.rvm/rubies/jruby-1.6.1/lib/ruby/1.9/net/http.rb:627:in
start' from /home/ubuntu/.rvm/rubies/jruby-1.6.1/lib/ruby/1.9/net/http.rb:1160:in
request’
from
/home/ubuntu/.rvm/rubies/jruby-1.6.1/lib/ruby/1.9/net/http.rb:880:in
get' from org/jruby/RubyBasicObject.java:1679:in
send’
from org/jruby/RubyKernel.java:2081:in send' from /home/ubuntu/.rvm/gems/jruby-1.6.1/gems/activeresource-2.3.9/lib/active_resource/connection.rb:171:in
request’
from
/home/ubuntu/.rvm/gems/jruby-1.6.1/gems/activesupport-2.3.9/lib/active_support/core_ext/benchmark.rb:17:in
ms' from /home/ubuntu/.rvm/rubies/jruby-1.6.1/lib/ruby/1.9/benchmark.rb:309:in
realtime’
from
/home/ubuntu/.rvm/gems/jruby-1.6.1/gems/activesupport-2.3.9/lib/active_support/core_ext/benchmark.rb:17:in
ms' from /home/ubuntu/.rvm/gems/jruby-1.6.1/gems/activeresource-2.3.9/lib/active_resource/connection.rb:171:in
request’
from
/home/ubuntu/.rvm/gems/jruby-1.6.1/gems/activeresource-2.3.9/lib/active_resource/connection.rb:138:in
get' from /home/ubuntu/.rvm/gems/jruby-1.6.1/gems/activeresource-2.3.9/lib/active_resource/base.rb:661:in
find_single’
from
/home/ubuntu/.rvm/gems/jruby-1.6.1/gems/activeresource-2.3.9/lib/active_resource/base.rb:589:in
find' from (irb):6:in
evaluate’
from org/jruby/RubyKernel.java:1093:in eval' from org/jruby/RubyKernel.java:1418:in
loop’
from org/jruby/RubyKernel.java:1205:in catch' from org/jruby/RubyKernel.java:1205:in
catch’
from /home/ubuntu/.rvm/rubies/jruby-1.6.1/bin/irb:18:in
`(root)'jruby-1.6.1 >
The above does not happen if i run in jruby 1.8.7 mode.
I am using:
2.6.32-305-ec2 #9-Ubuntu
java version “1.6.0_18”
OpenJDK Runtime Environment (IcedTea6 1.8.1) (6b18-1.8.1-0ubuntu1)
OpenJDK 64-Bit Server VM (build 16.0-b13, mixed mode)
Thx
-karl