LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > LSAPI undifined symbol: rb_io_reopen

Reply
 
Thread Tools Display Modes
  #1  
Old 03-14-2007, 03:06 AM
andi andi is offline
New Member
 
Join Date: Mar 2007
Posts: 3
Default 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

Last edited by andi; 03-14-2007 at 03:54 AM..
Reply With Quote
  #2  
Old 03-14-2007, 06:07 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
What's your OS and Ruby version?
Reply With Quote
  #3  
Old 03-14-2007, 06:19 AM
andi andi is offline
New Member
 
Join Date: Mar 2007
Posts: 3
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 by andi; 03-14-2007 at 06:24 AM..
Reply With Quote
  #4  
Old 03-14-2007, 08:15 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
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.
Reply With Quote
  #5  
Old 03-14-2007, 08:32 AM
andi andi is offline
New Member
 
Join Date: Mar 2007
Posts: 3
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
Reply With Quote
  #6  
Old 03-14-2007, 09:13 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Yes, the fix will go into 2.3 release.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:43 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.