Test Server Problem Displaying Images

Hi,

Ive developed my app locally using webrick and everything works fine.
Ive uploaded the site to a test server which contains a number of test
websites.

in my routes.rb i have the follwoing set up:

map.connect ‘:action/’, :controller => ‘main’

map.connect ‘:controller/:action/:id’

now this works fine so if i type ipaddress/testwebsite1/about_us into
the address bar it works fine and i get the about_us page with expected
text images.

ive checked the properties of 1 of the images on this page and its
location is: ipaddress/root/testwebsite1/images which is correct.

This app also contains an admin section so if i type into the address
bar ipaddress/testwebsite1/admin/articles/list the correct page is
displayed with the correct information but the images that are on that
page cannot be viewed.

Ive checked the properties of the same image on this page and its
looking for it in the root:

ipaddress/root/images which is incorrect it should be:
ipaddress/root/testwebsite1/images

Can anyone advise on how to set up the rooting so if a request comes in
for admin then it looks in correct place for images etc?

Another problem i dont know if it is related is i use a CSS style sheet
to display a list with arrows instead of the bullets:

ul.contentslist li {
padding-bottom: 12px;
list-style-image: url(/images/arrow.gif);
}

the above doesnt show the arrow for the bullets it shoes the default
circle but if i put the below … in front of the url they show up fine.
How can this be fixed as i dont want to have to keep changing when
switching from development to testing to production.

ul.contentslist li {
padding-bottom: 12px;
list-style-image: url(…/images/arrow.gif);
}

Any advice appreciated.

JB

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs