Web_service_api works under WEBRick, but not cgi


I have created the following controller


In there, I have

class Stock::ServiceController < ApplicationController

web_service_api Stock::ServiceAPI

Then, I created


The content of service_api.rb is

class Stock::ServiceAPI < ActionWebService::API::Base
api_method :get, :expects =>

If I accessed the server running in Webrick with the following
client code, it works

server = XMLRPC::Client.new(“localhost”, “/stock/service/api”, 3003)

But if I access the server running in the cgi mode with the following
client code, I got an error

server = XMLRPC::Client.ne("", “//stock/service/api”,

And the error was

Processing Base#index (for at 2005-12-08 11:53:36) [GET]
Parameters: {}
MissingSourceFile (no such file to load – service_api):
/usr/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in require__' /usr/lib/site_ruby/1.8/rubygems/custom_require.rb:21:inrequire’

Anyone knows what is going on here?