How to access bitcoin client from ruby using Rpc client? I'd like to access local bitcoin node from ruby by using RPC client. The following is my code, and it returns the next code. Could you tell me how to call Bitcoin client on ruby?

#console    
NoMethodError (undefined method `getblockcount' for #&lt;BitcoinRpc:0x007fe4e2577050&gt;):


#product_controller.rb
require 'net/http'
require 'uri'
require 'json'
class BitcoinRpc
  def initialize(service_url)
    @uri = URI.parse(service_url)
  end
end

class ProductsController &lt; ApplicationController
  require 'openassets'
  require 'bitcoin'
  include Bitcoin::Util
  include Bitcoin::Builder
  h = BitcoinRpc.new('http://'rpcuser':'rpcpassword'@localhost:8332')
  puts(h.getblockcount)
  ....
I've solved the problem by changing the url as follows. 
http://'rpcuser':'rpcpassword'@127.0.0.1:8332'