Forum: Ruby on Rails web_service_api works under WEBRick, but not cgi

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Thomas K. (Guest)
on 2005-12-08 19:13
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 => <parameters>

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

  server ="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 ="<host>", "/<project>/stock/service/api",

And the error was

  Processing Base#index (for <ip> 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:in `require'

Anyone knows what is going on here?
This topic is locked and can not be replied to.