Forum: Ruby on Rails Switchtower problem: Application error and no logs

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
55fb785d1720b98e5ea97350f9d2c2d6?d=identicon&s=25 rails (Guest)
on 2005-11-19 19:57
(Received via mailing list)
I've just tried to deploy my rails application with switchtower. It
appears to have been transferred correctly, but I can't get it to
work. When I try to open a page, it takes forever, before
"Application error - Rails application failed to start properly"
shows up (even in development mode). No log files show up, so I
cannot find out what's wrong.

Any suggestions?
992fe8c19bbbc27f2b562a9f96efc03d?d=identicon&s=25 jamis (Guest)
on 2005-11-19 20:32
(Received via mailing list)
On Nov 19, 2005, at 11:56 AM, Jeroen Heijmans wrote:

> I've just tried to deploy my rails application with switchtower. It
> appears to have been transferred correctly, but I can't get it to
> work. When I try to open a page, it takes forever, before
> "Application error - Rails application failed to start properly"
> shows up (even in development mode). No log files show up, so I
> cannot find out what's wrong.

A few things that commonly bite me in production:

* Are the permissions on the log directory (and log files, if
applicable) such that they can be written to by the appropriate user?

* If using apache, is your .htaccess file configured correctly for
production?

* Does anything show up in the apache access/error logs?

- Jamis
55fb785d1720b98e5ea97350f9d2c2d6?d=identicon&s=25 rails (Guest)
on 2005-11-19 20:45
(Received via mailing list)
On 19-nov-2005, at 20:30, Jamis Buck wrote:
> A few things that commonly bite me in production:
>
> * Are the permissions on the log directory (and log files, if
> applicable) such that they can be written to by the appropriate user?

Yes, they are. Also, if I read it correctly, Switchtower should set
these permissions.

> * If using apache, is your .htaccess file configured correctly for
> production?

I'm using the same .htaccess file that works for my non-Switchtower-
deployed application, which works fine. It is really just the
default .htaccess file, but with FastCGI.

> * Does anything show up in the apache access/error logs?

Yes, the requests show up in the log, but no errors are listed.
992fe8c19bbbc27f2b562a9f96efc03d?d=identicon&s=25 jamis (Guest)
on 2005-11-19 20:58
(Received via mailing list)
On Nov 19, 2005, at 12:43 PM, Jeroen Heijmans wrote:

> On 19-nov-2005, at 20:30, Jamis Buck wrote:
>> A few things that commonly bite me in production:
>>
>> * Are the permissions on the log directory (and log files, if
>> applicable) such that they can be written to by the appropriate user?
>
> Yes, they are. Also, if I read it correctly, Switchtower should set
> these permissions.

It should, yes. But if you've tried to run something by hand (like a
migration) before your app ever ran, the log files will be created
with you as the owner, and may not be writable by the web user.
Anyway, you've said the permissions are good, so this isn't the problem.

Are there any files in the log directory?

> Yes, the requests show up in the log, but no errors are listed.
Ok. Now for the obvious questions then, just to get them out of the way:

* You've verified that the fastcgi processes are indeed running?
* You've tried restarting apache?
* You've tried killing the fastcgi listeners?
* Do you have any other rails/fastcgi applications on that machine?

Sorry I can't give more on-target advice. Hard to know what the issue
is without actually sitting down at the machine.

- Jamis
55fb785d1720b98e5ea97350f9d2c2d6?d=identicon&s=25 rails (Guest)
on 2005-11-19 21:07
(Received via mailing list)
On 19-nov-2005, at 20:57, Jamis Buck wrote:

> It should, yes. But if you've tried to run something by hand (like
> a migration) before your app ever ran, the log files will be
> created with you as the owner, and may not be writable by the web
> user. Anyway, you've said the permissions are good, so this isn't
> the problem.
>
> Are there any files in the log directory?

No, there aren't any.

> * You've verified that the fastcgi processes are indeed running?
> * You've tried restarting apache?
> * You've tried killing the fastcgi listeners?
> * Do you have any other rails/fastcgi applications on that machine?
>
> Sorry I can't give more on-target advice. Hard to know what the
> issue is without actually sitting down at the machine.

No problem, I appreciate the help. I cannot restart apache, as I am
not allowed to on my webhost's machine. I was able to kill the
fastcgi/ruby processes, and I killed them, but that didn't help.

I'm running my current (non-Switchtower-deployed) application on the
same server, and there are possibly other users doing the same
(although I can't tell).
4bd34a2216dc8bdbf1f017f64e4d59e8?d=identicon&s=25 kyle (Guest)
on 2005-11-19 21:07
(Received via mailing list)
Ever try running dispatch.fcgi directly?
55fb785d1720b98e5ea97350f9d2c2d6?d=identicon&s=25 rails (Guest)
on 2005-11-20 11:43
(Received via mailing list)
No, but I did now, and I got some useful information in the log. Thanks!
This topic is locked and can not be replied to.