Rails production no public directory

Hi guys…
I am deploying a new rails 3 app.
For this i am using rails 3, thin and apache.

But for hours now i have a problem with the public dir.
It cannot be accessed beceause it is filtered by the route file.

I have in my routes file the following:
match ‘/:id(/*path)’ => “websites#index”

it is obvious that this makes nice url /23/helloWorld etc.
In development mode there is no problem.

When i switch to production however this method is called. And beceause
for example
the image.png id doesn’t exist it redirects to /

does anybody know why this happens? (why doesn’t the app first check the
public folder!)

thanxs!

On Sep 11, 6:41 pm, jeljer te Wies [email protected] wrote:

it is obvious that this makes nice url /23/helloWorld etc.
In development mode there is no problem.

When i switch to production however this method is called. And beceause
for example
the image.png id doesn’t exist it redirects to /

does anybody know why this happens? (why doesn’t the app first check the
public folder!)

Are you just proxying all requests to thin ? Typically you configure
apache to serve up anything that exists in /public, only sending the
request to your rails backend if it doesn’t

red

Well i Tried to do It with apache.
I did it with setting directory. But this didn’t work.

I have been trying to solve It with apache for hours.
What should I set in my virtualhost ?

Gr

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