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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Ruby-LSAPI and Solaris Express Community Edition (SXCE.79)

Reply
 
Thread Tools Display Modes
  #1  
Old 05-21-2008, 08:05 AM
aclement aclement is offline
New Member
 
Join Date: May 2008
Location: Switzerland
Posts: 3
Default Ruby-LSAPI and Solaris Express Community Edition (SXCE.79)

Hi everybody,

I am trying to install the Ruby-LSAPI gem on a Solaris Express Community Edition box (actually, an Amazon EC2 instance), and I can't figure out how to succeed in.

First, I tried to install the gem:

Code:
gem install ruby-lsapi
and the following error occured:

Code:
Building native extensions.  This could take a while...
ERROR:  Error installing ruby-lsapi:
        ERROR: Failed to build gem native extension.

/usr/ruby/1.8/bin/ruby extconf.rb install ruby-lsapi
checking for main() in -lsocket... no
creating Makefile

make
/opt/SUNWspro.40/SS11/bin/cc -I. -I. -I/usr/ruby/1.8/lib/ruby/1.8/i386-solaris2.11 -I. -DTEXT_DOMAIN=""  -I/builds2/sfwnv-gate/proto/root_i386/usr/sfw/include  -I/builds2/sfwnv-gate/proto/root_i386/usr/include    -I/builds2/sfwnv-gate/proto/root_i386//readline-5.2/include -KPIC -xO3 -xbuiltin=%all -xinline=auto -xprefetch=auto -xdepend  -KPIC -c lsapilib.c
sh: /opt/SUNWspro.40/SS11/bin/cc: not found
*** Error code 1
make: Fatal error: Command failed for target `lsapilib.o'


Gem files will remain installed in /usr/ruby/1.8/lib/ruby/gems/1.8/gems/ruby-lsapi-3.2 for inspection.
Results logged to /usr/ruby/1.8/lib/ruby/gems/1.8/gems/ruby-lsapi-3.2/ext/lsapi/gem_make.out
Then I went to /usr/ruby/1.8/lib/ruby/gems/1.8/gems/ruby-lsapi-3.2/ext/lsapi and modified the Makefile as follows:
* right path for CC
* right libs and includes
* added -lsocket and -lnsl options

... and the lsapi.so file compiled!

Unfortunately, the LS web server log shows the following lines:

Code:
2008-05-21 16:34:13.074 [NOTICE] Loading LiteSpeed/3.3.12 Standard ...
2008-05-21 16:34:13.190 [NOTICE] [ADMIN] server socket: uds://opt/lsws/admin/tmp/admin.sock.7201
2008-05-21 16:34:13.190 [NOTICE] Loading configuration from /opt/lsws/conf/httpd_config.xml ...
2008-05-21 16:34:13.192 [INFO] old priority: 0, new priority: 0
2008-05-21 16:34:13.192 [INFO] [config:server:basic] For better obscurity, server version number is hidden in the response header.
2008-05-21 16:34:13.205 [NOTICE] The maximum number of file descriptor limit is set to 65536.
2008-05-21 16:34:13.255 [ERROR] [config:template:centralConfigLog] Listener [Default] does not exist
2008-05-21 16:34:13.255 [ERROR] [config:template:PHP_SuEXEC] Listener [Default] does not exist
2008-05-21 16:34:13.256 [ERROR] [config:template:EasyRailsWithSuEXEC] Listener [Default] does not exist
2008-05-21 16:34:13.258 [NOTICE] [AutoRestarter] new child process with pid=1364 is forked!
2008-05-21 16:34:13.261 [NOTICE] [child: 1364] Successfully change current user to ec2admin
2008-05-21 16:34:13.279 [INFO] [Rails:podtask:/] add child process pid: 1365
2008-05-21 16:34:13.279 [INFO] [Rails:podtask:/] pid list size: 1 
2008-05-21 16:34:13.279 [NOTICE] [Child: 1364] Setup swapping space...
2008-05-21 16:34:13.280 [NOTICE] [Child: 1364] LiteSpeed/3.3.12 Standard starts successfully!
2008-05-21 16:34:14.142 [NOTICE] [AutoUpdate] Checking for new releases...
2008-05-21 16:34:14.486 [INFO] [AutoUpdate] No new update.
2008-05-21 16:34:18.324 [INFO] [AdminPHP] pid list size: 1 
2008-05-21 16:34:18.324 [INFO] [AdminPHP] add child process pid: 1382
2008-05-21 16:35:02.931 [INFO] [83.77.57.23:51247-0#podtask] connection to [uds://tmp/lshttpd/podtask:_.sock] on request #0, error: Connection reset by peer!
2008-05-21 16:35:02.932 [INFO] [83.77.57.23:51247-0#podtask] connection to [uds://tmp/lshttpd/podtask:_.sock] on request #0, error: Connection reset by peer!
2008-05-21 16:35:02.932 [INFO] [83.77.57.23:51247-0#podtask] connection to [uds://tmp/lshttpd/podtask:_.sock] on request #0, error: Connection reset by peer!
2008-05-21 16:35:02.932 [NOTICE] [83.77.57.23:51247-0#podtask] oops! 503 Service Unavailable
2008-05-21 16:35:02.932 [NOTICE] [83.77.57.23:51247-0#podtask] Content len: 0, Request line: 
GET / HTTP/1.1
2008-05-21 16:35:02.932 [NOTICE] [83.77.57.23:51247-0#podtask] Redirect: #2, URL: /dispatch.lsapi
If I try a "require 'lsapi'" at the Ruby "console" (irb), I get the following:

Code:
irb(main):001:0> require 'lsapi'
LS=> true
LSG/usr/ruby/1.8/lib/ruby/1.8/irb/input-method.rb:97:in `readline'LS
: LS1wrong argument type LSAPI (expected File)LS
 (LSTypeErrorLS
)
LSJ     from /usr/ruby/1.8/lib/ruby/1.8/irb/input-method.rb:97:in `gets'
LSD     from /usr/ruby/1.8/lib/ruby/1.8/irb.rb:132:in `eval_input'
LSG     from /usr/ruby/1.8/lib/ruby/1.8/irb.rb:259:in `signal_status'
LSD     from /usr/ruby/1.8/lib/ruby/1.8/irb.rb:131:in `eval_input'
LSG     from /usr/ruby/1.8/lib/ruby/1.8/irb/ruby-lex.rb:189:in `call'
LSL     from /usr/ruby/1.8/lib/ruby/1.8/irb/ruby-lex.rb:189:in `buf_input'
LSG     from /usr/ruby/1.8/lib/ruby/1.8/irb/ruby-lex.rb:104:in `getc'
LSG     from /usr/ruby/1.8/lib/ruby/1.8/irb/slex.rb:206:in `match_io'
LS       ... 9 levels...
LS>     from /usr/ruby/1.8/lib/ruby/1.8/irb.rb:70:in `start'
LS>     from /usr/ruby/1.8/lib/ruby/1.8/irb.rb:69:in `catch'
LS>     from /usr/ruby/1.8/lib/ruby/1.8/irb.rb:69:in `start'
LS      from /usr/bin/irb:13
To make a long story short: is there someone who knows how to install Ruby-LSAPI under Solaris Express Community Edition?

Thank you very much in advance!
Best regards,
Alain
Reply With Quote
  #2  
Old 05-21-2008, 11:30 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 6,646
Try install ruby, RoR and gem from source code.
If you are using 64bit solaris, make sure do

export CC=gcc -m64

to compile everything to 64bit binary.
Reply With Quote
  #3  
Old 05-21-2008, 11:34 AM
aclement aclement is offline
New Member
 
Join Date: May 2008
Location: Switzerland
Posts: 3
Thank you very much for your advice Mistwang. I'll give it a try ASAP and keep you informed.

Best regards,
Alain
Reply With Quote
  #4  
Old 05-21-2008, 01:16 PM
aclement aclement is offline
New Member
 
Join Date: May 2008
Location: Switzerland
Posts: 3
It works!
Thank you SO very much!

Have a nice day!
Regards,
Alain
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 01:47 PM.



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