LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Ruby/Rails (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=20)
-   -   LSAPI undifined symbol: rb_io_reopen (http://www.litespeedtech.com/support/forum/showthread.php?t=919)

andi 03-14-2007 03:06 AM

LSAPI undifined symbol: rb_io_reopen
 
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

mistwang 03-14-2007 06:07 AM

What's your OS and Ruby version?

andi 03-14-2007 06:19 AM

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

mistwang 03-14-2007 08:15 AM

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.

andi 03-14-2007 08:32 AM

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

mistwang 03-14-2007 09:13 AM

Yes, the fix will go into 2.3 release.


All times are GMT -7. The time now is 02:53 PM.