У меня есть следующий код
require 'rack/rpc'
class Server < Rack::RPC::Server
def hello_world
"Hello, world!"
end
rpc 'hello_world' => :hello_world
end
server = Server.new
use Rack::RPC::Endpoint, server
run server
имя скрипта - server.ru
Я запускаю сервер с командой
thin start -R server.ru
>> Thin web server (v1.3.1 codename Triple Espresso)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
Также пример клиента
require "xmlrpc/client"
# Make an object to represent the XML-RPC server.
server = XMLRPC::Client.new( "0.0.0.0", "/rpc", 3000)
# Call the remote server and get our result
result = server.call("hello_word")
puts result
следующая команда дает мне исключение
ruby client.rb
client.rb:414:in `call': Method hello_word missing or wrong number of parameters! (XMLRPC::FaultException)
from client.rb:7:in `<main>'
Почему hello_word не может быть найден? Спасибо.