Passenger on localhost

I installed passenger at home. How should I configure apache to make it
usable?
This was my last guess:

ServerName 127.0.0.1 DocumentRoot /var/www/html/docsearch/public

This gets by “apachectl start” without complaint, but I really haven’t a
clue what I’m doing :wink:

Do I need to access it via a different port? Or could I just set up a
link in my /var/www/html/index.html page?

On Jun 5, 2009, at 10:49 AM, Mk 27 wrote:

This gets by “apachectl start” without complaint, but I really
haven’t a
clue what I’m doing :wink:

Do I need to access it via a different port? Or could I just set up a
link in my /var/www/html/index.html page?

Edit your hosts file and point 127.0.0.1 to some local name like
docsearch.local. Then in your VirtualHost directive, use
docsearch.local:80. Or, if you’re on a Mac, just install PassengerPane
and drag/drop the folder to there and forget about all the junk I just
said :slight_smile:

Steve R. wrote:

Edit your hosts file and point 127.0.0.1 to some local name like
docsearch.local.

127.0.0.1 already points to localhost and some other aliases.

Or, if you’re on a Mac, just install PassengerPane
and drag/drop the folder to there and forget about all the junk I just
said :slight_smile:

I’m on linux, and I prefer to avoid GUI apps in programming as much as
possible (which IMO should always be possible).

Okay, I added an alias for “dev.docsearch.net” and httpd.conf now
contains:

<VirtualHost *:80>
ServerName dev.docsearch.net
DocumentRoot “/var/www/html/docsearch/public/”

which does take me to the index.html, but if I try a method I get a
rails message:

“We’re sorry, but something went wrong.”

Unfortunately, there is absolutely no information about the
“something” error to find, either in docsearch/logs or in the apache
logs. Up to now I’ve just been working in a “development” environment.
Does that have anything to do with it?

I added

<Directory /var/www/html/html/docsearch>
RailsEnv “development”

But not luck…

I find the addendum

“We’ve been notified about this issue…”

somewhat ironic as it is not true. So fallacious, more than just
“ironic”.

Mk 27 wrote:

I find the addendum

“We’ve been notified about this issue…”

somewhat ironic as it is not true. So fallacious, more than just
“ironic”.

Does anyone actually use passenger? Is there anyway to get it to
provide some trace output via apache, a la WEBrick?

Are you watching your logs? You should have all kinds of information
about what went wrong. Are you running in development or production
mode? Really, the Phusion documentation is kick-ass great. I would
guess that shared hosts are using Passenger, several VPS services I
know of are including it in their recommended Rails stack. I’m
currently running 5 sites on one server under Passenger.

Yeah, people are using it.

Steve R. wrote:

Are you watching your logs? You should have all kinds of information
about what went wrong. Are you running in development or production
mode?

As I mentioned earlier, there is NO output to any logs by passenger,
other than

Apache/2.2.10 (Unix) DAV/2 Phusion_Passenger/2.2.2 configured –
resuming normal operations

Apache’s log level is set to “debug”. There are 0 bytes in the actual
app logs. And there is at least an entire post here about my mode. I
have the feeling we are using different software.

Really, the Phusion documentation is kick-ass great.

I would feel that way too, if “Phusion Passenger” itself worked. Since
my app runs fine under WEBbrick, I am kind of at a loss.

Certainly, it is not “kick-ass” to have the software throw up this
notice

“We’re sorry, but something went wrong. We’ve been notified about this
issue.”

and then do absolutely noting else (who is this “we” and how were they
“notified”? Maybe it is inclusive, like: “Here we are. Something went
wrong! We – including you – have just been notified. Goodbye!” I
feel kind of like Dave talking to Hal, outside the air lock*.). I would
say it was lame, but I don’t want to offend anyone :wink:

*like wow, what kick-ass software. It lies!

2009/6/6 Mk 27 [email protected]:

resuming normal operations
Certainly, it is not “kick-ass” to have the software throw up this

Are you sure the ‘something went wrong’ message is not from your
public/500.html file?

Colin

On Sat, Jun 6, 2009 at 5:39 AM, Mk 27[email protected]
wrote:

resuming normal operations
Anything in the rails log for your environment which should be in
/var/www/html/docsearch/log


Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale

Rahmat Budiharso wrote:

I use passenger to, and it works like a charm.
this is what i got in my /etc/apache2/sites-available/rails

<VirtualHost *:80>
ServerName rpdam.local
DocumentRoot /home/rahmat/Rails-Projects/pdam/public
RailsEnv development

I had it like this:

<VirtualHost *:80>
ServerName dev.docsearch.net
DocumentRoot “/var/www/html/docsearch/public/”

<Directory /var/www/html/docsearch>
RailsEnv development

Which I copied that from the Phusion webpage documentation. Anyway,
moving “RailsEnv …” into the VirtualHost block worked. I guess that
documentation kicked my ass!

Thanks Rahmat.

I use passenger to, and it works like a charm.
this is what i got in my /etc/apache2/sites-available/rails

<VirtualHost *:80>
ServerName rpdam.local
DocumentRoot /home/rahmat/Rails-Projects/pdam/public
RailsEnv development

and this is in my /etc/hosts

127.0.0.1 rpdam.local

hopes this helps…

“We’re sorry, but something went wrong. We’ve been notified about this
issue.”
It is a rails error, and maybe you are in production mode,
My apache conf:
NameVirtualHost site.com:80

ServerName www.site.com
RailsEnv development
RailsAllowModRewrite off
DocumentRoot /var/www/site/public

and its running fine in development.
Check /log dir, and look for development.log file,.

alexey wrote:

“We’re sorry, but something went wrong. We’ve been notified about this
issue.”
It is a rails error, and maybe you are in production mode,
My apache conf:
NameVirtualHost site.com:80

ServerName www.site.com
RailsEnv development
RailsAllowModRewrite off
DocumentRoot /var/www/site/public

and its running fine in development.
Check /log dir, and look for development.log file,.

it is Ok for me also.
But why it is not working with RailsEnv production???
Is it not a bit strange!?:frowning:

Ahmet K. wrote:

 DocumentRoot /var/www/site/public

and its running fine in development.
Check /log dir, and look for development.log file,.

it is Ok for me also.
But why it is not working with RailsEnv production???
Is it not a bit strange!?:frowning:

So, if I understand correctly, the exact stuff from httpd.conf that
you’ve shown above works, but it fails if you change to RailsEnv
production?

Have you looked at your Apache error_log and/or
/path/to/app/log/production.log? Maybe there’s a clue there. It seems an
exception is being raised and you are seeing the default error page. If
that’s the case, then there should be a log entry.

Steve R. wrote:

Ahmet K. wrote:

 DocumentRoot /var/www/site/public

and its running fine in development.
Check /log dir, and look for development.log file,.

it is Ok for me also.
But why it is not working with RailsEnv production???
Is it not a bit strange!?:frowning:

So, if I understand correctly, the exact stuff from httpd.conf that
you’ve shown above works, but it fails if you change to RailsEnv
production?

Have you looked at your Apache error_log and/or
/path/to/app/log/production.log? Maybe there’s a clue there. It seems an
exception is being raised and you are seeing the default error page. If
that’s the case, then there should be a log entry.

nothing different than others people logs.
That reason I told it is a bit strange.
and What is the difference between development and production env.?
If I can find it I can solve my problem.

Ahmet K. wrote:

Is it not a bit strange!?:frowning:
nothing different than others people logs.
That reason I told it is a bit strange.
and What is the difference between development and production env.?
If I can find it I can solve my problem.

The differences are numerous, but primarily they revolve around
ActiveRecord optimizations, exceptions are gobbled up, files are not
reloaded between requests when they change, and of course the logging
level is lower.

My configuration looks like this:

<VirtualHost *:80>
ServerName foosball.local
DocumentRoot “/Users/foos/Developer/Rails/foosball/public”
RailsEnv production
<Directory “/Users/foos/Developer/Rails/foosball/public”>
Order allow,deny
Allow from all

As I recall, you are using

That shouldn’t matter, though.

Try setting your production log level to (production.rb)

ActiveRecord::Base.logger.level = :debug
config.whiny_nils = true

See:

This is also grasping at straws, because what it seems is happening is
that something is raising an exception in your app and it’s being
rescued in public (default in production, not development).

Remind me … what OS?