Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Problem loading files in Ruby CGI scripts
Toby Rodwell
5/15/2007 1:15:00 PM
This is not a Ruby problem as such, but I'm hoping someone will have
come across this problem before and can advise.
I have a basic CGI script, that loads a YAML file and prints out HTML
and a few calculated results. The script works fine when I run it from
the command line, but (no surprise!) I have problems when trying to
access it from a browser. The error message in the APache log
(abbreviated) is " No such file or directory -
/usr/local/lib/ruby/1.8/sparc-solaris2.9/stringio.so (LoadError)
from /usr/local/lib/ruby/1.8/yaml.rb:9"
I guess this must be something to do with permissions, or environment,
because the file referred to *does* exist. Broadly speaking, from a few
basic tests, it seems that none of the 'requires' are working.
Any ideas?
thanks in advance
--
Posted via
http://www.ruby-...
.
2 Answers
Toby Rodwell
5/15/2007 2:42:00 PM
0
Glen Holcomb wrote:
> Only some obvious ones. Is your environment set up correctly? Does the
> Apache uid have access to those files? Are you running Apache in a
> chroot
> jail?
The file permissions seem OK (all can be read by anybody). I don't know
about a chroot jail (I'm not the sys admin). As far as environment is
concerned I must admit I don't know how to check or alter that - can you
point me in the right direction? Thanks again.
--
Posted via
http://www.ruby-...
.
Toby Rodwell
5/15/2007 7:01:00 PM
0
Problem solved - my sys admin sorted me out with an .htaccess file,
which for the record is:
SetEnv LD_LIBRARY_PATH
/usr/local/lib:/usr/sfw/lib:/net/dante-sw/lib:/usr/ccs/lib:/usr/lib:/lib
SetEnv LD_RUN_PATH
/usr/local/lib:/usr/sfw/lib:/net/dante-sw/lib:/usr/ccs/lib:/usr/lib:/lib
and that did the trick!
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Problem loading files in Ruby CGI scripts
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password