passenger on localhost

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 Ross 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/"
</VirtualHost>

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"
</Directory>

But not luck...

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 Ross 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!

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

Colin

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

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
<VirtualHost www.site.com:80>
    ServerName www.site.com
    RailsEnv development
    RailsAllowModRewrite off
    DocumentRoot /var/www/site/public
</VirtualHost>

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
<VirtualHost www.site.com:80>
    ServerName www.site.com
    RailsEnv development
    RailsAllowModRewrite off
    DocumentRoot /var/www/site/public
</VirtualHost>

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 Kilic wrote:

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
<VirtualHost www.site.com:80>
     ServerName www.site.com
     RailsEnv development
     RailsAllowModRewrite off
     DocumentRoot /var/www/site/public
</VirtualHost>

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 Ross wrote:

Ahmet Kilic wrote:

     DocumentRoot /var/www/site/public
</VirtualHost>

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 Kilic wrote:

Steve Ross wrote:

Ahmet Kilic wrote:

      DocumentRoot /var/www/site/public
</VirtualHost>

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.

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
   </Directory>
</VirtualHost>

As I recall, you are using <VirtualHost somename:80>

That shouldn't matter, though.

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

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

See: http://guides.rubyonrails.org/debugging_rails_applications.html#log-levels

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?