/public recognition failed on lighttpd

hello. please help.

my app is working under apache/cgi. i switched to lighttpd and
everything works except loading stylesheets and images (and probably
other content in /public directory). the paths in html are correct. when
i typed images/stylesheets into browser manually, i got recognition
failed error. got idea?

thanks. fero.

please post

the tree dump of you file system from the public dir,
the contents of the head tag in the rendered html file and
the head tag of your ruby template

here you are. but when image url manualy it should work, not recognition
error. am i correct? so:

(the application is on http://www.websupport.sk/icct.sk/ic1/public_entry
(public_entry is controller))

the tree dump of you file system from the public dir:

.:
404.html
500.html
500.jpg
banner
csshover.htc
data_development
data_production
dispatch.cgi
dispatch.fcgi
dispatch.rb
dispatch2.fcgi
fakof.txt
fastcgi.server
favicon.ico
images
index.html
javascripts
nice_error.rhtml
robots.txt
static
stylesheets

./banner:
baner_meta.swf

./images:
500-transparent.gif
… (many images here …)

./javascripts:
application.js
controls.js
dragdrop.js
effects.js
prototype.js

./static:
404.rhtml
500.rhtml
info.rhtml
info_en
info_sk
interactive.rhtml
sections

./static/info_en:

./static/info_sk:
2006.rhtml
about.rhtml
space.rhtml
staff.rhtml
web.rhtml

./static/sections:
divadlo.rhtml
film.rhtml
hudba.rhtml
inkubator.rhtml
literatura.rhtml
tanec.rhtml
visual.rhtml

./stylesheets:
admin.css
advanced_layout.css
common.css
dynamic.css
public2.css
scaffold.css
zana

./stylesheets/zana:
centrum-male.gif

./stylesheets/zana/menu:
01.gif
02.gif

./stylesheets/zana/pict:
divadlo.gif

./stylesheets/zana/sekcie:
01.gif

the contents of the head tag in the rendered html file and:

IC Culture train: News

the head tag of your ruby template

<%= @title %> <%= stylesheet_link_tag "scaffold", "common", "dynamic", "public2", :media => "all" %>

no no no… /icct.sk/ic1 is request.relative_url_root … so this
should be good… path are good… when i am on cgi, i type to browser
for example

http://websupport.sk/icct.sk/ic1/images/something.gif - it works

on lighttpd i got RECOGNITION FAILED.

there is the problem, i assume, and thats why i cannot see images and
stylesheets on the page.

fero wrote:

no no no… /icct.sk/ic1 is request.relative_url_root … so this
should be good… path are good… when i am on cgi, i type to browser
for example

http://websupport.sk/icct.sk/ic1/images/something.gif - it works

on lighttpd i got RECOGNITION FAILED.

there is the problem, i assume, and thats why i cannot see images and
stylesheets on the page.

tell you what hard code a link tag that doesn’t have /icct.sk/ic1 and
see what happens

scratch that I see what your saying

so here is where I see a problem.

your stylesheets are found at “/stylesheets/file.css” .
However, you
are trying to access them at “/icct.sk/ic1/stylesheets/file.css”

I don’t know why your stylesheet_link_tag function is getting this wrong
I can only assume it is to do with your configuration or rails version.

till you can fix this problem I would just hack through by adding these
two dirs in public (/icct.sk/ic1/) which I pressume is your home dir or
app_root.

However the real problem is probably in you enviroments.rb

and no it does not work

anybody help! :wink: i am pretty desperated and deadline coming closer :slight_smile:

fero wrote:

anybody help! :wink: i am pretty desperated and deadline coming closer :slight_smile:

Fero

Did you get any help with this? I’m getting the same problem

eggman2001 wrote:

Matt - were you able to solve this? I believe it’s an issue of using
relative_root_url with lighttpd but I haven’t been able to find a
solution yet.

On Feb 15, 6:01 am, Matt D. [email protected]

Hi eggman2001

We did in a way, we moved to nginx and mongrel

Much better mate.

Sorry I can’t be of more assistance.

Matt - were you able to solve this? I believe it’s an issue of using
relative_root_url with lighttpd but I haven’t been able to find a
solution yet.

On Feb 15, 6:01 am, Matt D. [email protected]