LSAPI undifined symbol: rb_io_reopen

Discussion in 'Ruby/Rails' started by andi, Mar 14, 2007.

  1. andi

    andi New Member

    Hi,

    i've experiencing problems with current LSAPI. The stderr.log says this:

    Code:
    ruby: relocation error: /usr/local/lib/ruby/gems/1.8/gems/ruby-lsapi-2.2/lib/lsapi.so: undefined symbol: rb_io_reopen
    It happens when executing this action in a controller:

    Code:
      def system
        @rails_props = Array.new
        begin
          require_dependency "builtin/rails_info/rails/info.rb"
          @rails_props = Rails::Info.properties
        rescue
          @rails_props[0] = ["Message", "This info is not available at the moment" ]
        end
      end
    LiteSpeed displays a status 503 "Sever busy" notice.

    In earlier LSAPIs it worked fine. I'm sorry that I don't have more information on this, but all logs look fine except the stderr.log of LiteSpeed. I've tried to load the info.rb file in the environment.rb or directly at the top of the controller, no use.

    I'd appreciate any hints and help where to look to resolve this.

    Thanks
    Andi

    PS: I forgot: Litespeed 2.2.6, ruby-LSAPI 2.2
    Last edited: Mar 14, 2007
  2. mistwang

    mistwang LiteSpeed Staff

    What's your OS and Ruby version?
  3. andi

    andi New Member

    OS: Debian 3.1r3 (Kernel: 2.6.8-3-386)
    Ruby: 1.8.5

    The Ruby is custom built against the stock debian libs. Nothing fancy, here are the configure options:

    ./configure --prefix=/usr/local --enable-pthread

    Thanks,
    -andi
    Last edited: Mar 14, 2007
  4. mistwang

    mistwang LiteSpeed Staff

    Please try the following patch to ruby-lsapi-2.2, open file ext/lsapi/lsruby.c, in function:
    Code:
    static VALUE lsapi_reopen( int argc, VALUE *argv, VALUE self)
    replace:
    Code:
    return rb_io_reopen( argc, argv, orig_stderr );
    with
    Code:
    return rb_funcall( orig_stderr, rb_intern( "reopen" ), 2, argc, argv );
    build lsapi extension, and try again.
  5. andi

    andi New Member

    Perfect. That makes it work like charm! Will the fix will be part of the next release?

    Thanks a lot for the quick and competent help!

    -andi
  6. mistwang

    mistwang LiteSpeed Staff

    Yes, the fix will go into 2.3 release.

Share This Page