Rails 5 run puma and simple xmlrpc server at the same time

不想你离开。 提交于 2019-12-11 05:28:47

问题


My rails app needs a XMLRPC server. But There when I try:

rails s

Only XMLRPC server starts and puma does not start. What I have done in my config.rb file is:

require_relative 'config/environment'
require "xmlrpc/server"


server = XMLRPC::Server.new( 1234 )
server.add_handler('my_test.test') { |msg|

   "responce for #{msg}"
}
server.serve # HERE IS WHERE APP STUCKS WITH XMLRPC
run Rails.application

Is there any idea to perform this?

来源:https://stackoverflow.com/questions/38435969/rails-5-run-puma-and-simple-xmlrpc-server-at-the-same-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!