As for your problem, this can happen if Phusion Passenger doesn't
detect your application. Phusion Passenger checks for the file
$DOCUMENT_ROOT/../config.ru or
$DOCUMENT_ROOT/../config/environment.rb, and if one of those files are
present then Phusion Passenger will start the Rack/Rails app and
forward the request, but only if no corresponding .html file exists
for the URL. Failure to detect the application can happen if Apache
doesn't have the appropriate permissions to check for the existence of
those files.
> --
> You received this message because you are subscribed to the Google Groups "Phusion Passenger Discussions" group.
> To post to this group, send email to phusion-...@googlegroups.com.
> To unsubscribe from this group, send email to phusion-passen...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/phusion-passenger?hl=en.
>
>
--
Phusion | Ruby & Rails deployment, scaling and tuning solutions
Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)
Thanks. :)
As for your problem, this can happen if Phusion Passenger doesn't
detect your application.
Phusion Passenger checks for the file
$DOCUMENT_ROOT/../config.ru or
$DOCUMENT_ROOT/../config/environment.rb, and if one of those files are
present then Phusion Passenger will start the Rack/Rails app and
forward the request, but only if no corresponding .html file exists
for the URL. Failure to detect the application can happen if Apache
doesn't have the appropriate permissions to check for the existence of
those files.
Phusion Passenger passes the request to Apache if it doesn't detect the request as a dynamic request that the app should handle.
Try setting RackBaseURI / to force detection as Rack app.
Sent from my Android phone.
Add the following to your production.rb or development.rb file to get rid of the 'cache: ....' line
config.action_dispatch.rack_cache = {:metastore => "rails:/", :entitystore => "rails:/", :verbose => false}
I pulled that line from within the "middleware" configuration of Rails an just changed the 'verbose' from true to false.
-- Brian
On Sep 19, 2011, at 4:51 , Revence Kalibwani wrote:
> Hello, Phusion Passengers;
> Do you have rack-cache installed? I spent a good day+ tracing through
> Passenger/Rails/Rack and lots of other gems to find out why lines similar
> to that one was appearing.
I do in fact have rack-cache installed. I believe it is a dependency of
Rails 3.1.
>
> Add the following to your production.rb or development.rb file to get rid
> of the 'cache: ....' line
>
> config.action_dispatch.rack_cache = {:metastore => "rails:/", :entitystore
> => "rails:/", :verbose => false}
That did in fact get rid of the cache: line, but the problem remained. It
just remained silently.
It is a bit strange that, due to the many tortoises down there, it is not
even possible to know where this is coming from. Google seems to suggest
that I am an early sufferer, because the problem has not been dealt with
before (certainly not where Google can reach).
--
Revence
Let's first figure out whether the request gets to the Ruby app at
all. If you restart Apache and access /, do you notice a small delay
caused by spawning the app?
You seem to have scared it into working. Actually, it seems that running
a parallel `rails s` was interfering with it somehow. I had been running
`rails s` as some kind of control. (Since when did the control ever
interfere with the experiment? --Except in quantum mechanics, of
course?)
But it seems fine now; it would appear that stopping the other `rails s`
healed the problem. I have RackBaseURI / and RailsEnv development in the
conf.
That's the first time I've heard of 'rails s' interfering with Phusion
Passenger. :S Must be some kind of rack-cache state interference that
I don't know of.
It may be that I am wrong about the cause-and-effect. I tweaked too many
things in desperation to be totally sure about this stuff.
Even so, Passenger **rocks**. :o) In fact, Rails has two epochs: BP and
AP. Before-Passenger, and After-Passenger.
--
Revence
In this case, the development database was not set up, and while `rails
s` showed the error in detail, the production app in Passenger showed
only what I described originally:
A 500 page, and cache [GET /] miss in the error log.
I created the database, and it went away.
Also, regarding clearing caches, I still do a hacky `rm -rf tmp/cache/*` and also flushing the ones in public that are generated due to the caches_page directive (mine are usually cleared by `rm -rf public/en*`). I could probably use standard invalidation functions under `rails c`, but you're right, it should be nicer.
--
Revence
(Typed on mobile phone keyboard, so excuse any typos herein.
Rédigé avec clavier du téléphone; je m'excuse pour mes fautes d'orthographe qu'il y ait ci-dessus.)
-----Message d'origine-----
De:Andrew Shatnyy
Envoyé: 03/10/2011, 07:44
To: Phusion Passenger Discussions
Objet:[phusion-passenger] Re: cache: [GET /] miss
--
Have you tried running the same site with `rails s -e production` ? Does
it work?
--
You received this message because you are subscribed to the Google Groups "Phusion Passenger Discussions" group.
To post to this group, send email to phusion-...@googlegroups.com.
To unsubscribe from this group, send email to phusion-passen...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/phusion-passenger?hl=en.