Problems running lsapi

Jash

New Member
#1
Hi,

I'm having problems getting the lsapi to work, I hope someone here can shed some light for me.

Firstly, I'm running...

ruby 1.8.6 (2007-06-07 patchlevel 36) [x86_64-linux]
gem 1.0.1
lsws 3.0.3
on Ubuntu 6.0.6 LTS.

All build tools, ruby, etc have been installed from the main apt repositories.

My ultimate aim is to get a Camping install up and running with lsapi but I'm not even close to that yet. :D

I've create a virtual host with what I think are the correct settings (relevant config options at the end of this post). I basically set up a new VH with settings from here but substituting out the rails specific stuff. At this point I'm using the example testlsapi.rb file as my bootstrap.

[83.148.144.105:45406-0#ruby.downthebackofthesofa.com] connection to [uds://tmp/lshttpd/ruby.downthebackofthesofa.com_lsapi.sock] on request #0, error: No such file or directory!
[uds://tmp/lshttpd/ruby.downthebackofthesofa.com_lsapi.sock] Connection refused, restart!
[83.148.144.105:45406-0#ruby.downthebackofthesofa.com] oops! 503 Service Unavailable
[83.148.144.105:45406-0#ruby.downthebackofthesofa.com] Content len: 0, Request line:
GET /bootstrap.lsapi HTTP/1.1



On trying to run the bootstrap script through the command line the script exits on requiring lsapi. As a minimal example.

puts 'foo'
require 'lsapi'
puts 'foo'

prints 'foo' then returns to the prompt.

on running the same script through irb I get the following error on requiring lsapi

LS>/usr/lib/ruby/1.8/irb/input-method.rb:97:in `readline'LS
: LS1wrong argument type LSAPI (expected File)LS
(LSTypeErrorLS
)
LSA from /usr/lib/ruby/1.8/irb/input-method.rb:97:in `gets'
LS; from /usr/lib/ruby/1.8/irb.rb:132:in `eval_input'
LS> from /usr/lib/ruby/1.8/irb.rb:259:in `signal_status'
LS; from /usr/lib/ruby/1.8/irb.rb:131:in `eval_input'
LS> from /usr/lib/ruby/1.8/irb/ruby-lex.rb:189:in `call'
LSC from /usr/lib/ruby/1.8/irb/ruby-lex.rb:189:in `buf_input'
LS> from /usr/lib/ruby/1.8/irb/ruby-lex.rb:104:in `getc'
LS> from /usr/lib/ruby/1.8/irb/slex.rb:206:in `match_io'
LS ... 9 levels...
LS5 from /usr/lib/ruby/1.8/irb.rb:70:in `start'
LS5 from /usr/lib/ruby/1.8/irb.rb:69:in `catch'
LS5 from /usr/lib/ruby/1.8/irb.rb:69:in `start'
LS$ from /usr/local/bin/irb:13

I'm not sure if this is 'correct' behaviour under irb. This thread mentioned it's a known bug that was fixed.

I'd be grateful if someone could tell me if this is the expected gem behaviour in these circumstances?

Many thanks.
 

mistwang

LiteSpeed Staff
#2
[83.148.144.105:45406-0#ruby.downthebackofthesofa.com] connection to [uds://tmp/lshttpd/ruby.downthebackofthesofa.com_lsapi.sock] on request #0, error: No such file or directory!
[uds://tmp/lshttpd/ruby.downthebackofthesofa.com_lsapi.sock] Connection refused, restart!
[83.148.144.105:45406-0#ruby.downthebackofthesofa.com] oops! 503 Service Unavailable
[83.148.144.105:45406-0#ruby.downthebackofthesofa.com] Content len: 0, Request line:
GET /bootstrap.lsapi HTTP/1.1
Make sure you have "Auto Start" of the bootstrap.lsapi external app set to "Yes".
 
Top