503 error, rails not running

karloff

Well-Known Member
#1
Hi,

I have setup all my stuff, however when i try to run a site with rails i get a 503 error. if i boot it to webrick (on port 3000) it works fine) ruby-lsapi is install a-ok.

permissions seem to be fine. can anyone enlighten me to why tis ain't working?
 

karloff

Well-Known Member
#3
i get the following error in the stderr.log

/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:159:in `require_frameworks': no such file to load -- openssl (RuntimeError)
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:88:in `process'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:49:in `send'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:49:in `run'
from ./config/environment.rb:13
from /usr/local/lsws/fcgi-bin/RailsRunner.rb:5:in `require'
from /usr/local/lsws/fcgi-bin/RailsRunner.rb:5
and can't find any ruby processes going on with grep, how do i unistall ruby-lsapi?
 

mistwang

LiteSpeed Staff
#4
This error has nothing to do with ruby-lsapi.
Maybe you need to explicitly add "LD_LIBRARY_PATH" environment variable under "ruby rails" tab in order for rails to find the missing library?
LSWS only set "PATH=/bin:/usr/bin" environment variable, all other shell environment variables are stripped, you need to add them explicitly if need.


Also make the correct ruby binary has been used if there are multiple installations of ruby.
 

karloff

Well-Known Member
#5
thre is only one install of ruby on my server

added this to the enviroment in rails tab

LD_LIBRARY_PATH=/var/www

still no joy, it that what you ment?
 

mistwang

LiteSpeed Staff
#6
You need to check variables set in your current shell environment
with command

Code:
env
Add all of them see if it help, then strip one by one.
 

karloff

Well-Known Member
#9
hmmm, i'm lost i get...

HOSTNAME=karloff
TERM=xterm
SHELL=/bin/bash
HISTSIZE=1000
SSH_CLIENT=91.105.246.57 1102 22
OLDPWD=/var/www/john-curley.com
SSH_TTY=/dev/pts/0
USER=root
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:eek:r=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
MAIL=/var/spool/mail/root
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
INPUTRC=/etc/inputrc
PWD=/var/www
SHLVL=1
HOME=/root
LOGNAME=root
SSH_CONNECTION=91.105.246.57 1102 67.207.133.178 22
LESSOPEN=|/usr/bin/lesspipe.sh %s
G_BROKEN_FILENAMES=1
_=/bin/env


pwd is set to var/www (where my rails apps are)

if i can't set the path elsewhere how can i get it to work. changed it in the rails tab and nothing
 

mistwang

LiteSpeed Staff
#10
PWD should not matter. You can remove that. It does not looks like those should affect your rails app.

Can you confirm that you run rails in the same mode, under LiteSpeed and WEBrick? WEBrick default to "Development".
 

mistwang

LiteSpeed Staff
#16
Looks like you have to "strace" the ruby process to find out why.

try
Code:
strace -f -p <pid_of_lshttpd_child_process>
You should find the failed syscall that break the rails initialization.

You can compare it with output from WEBrick
Code:
strace script/server[code]
 
Top