Chris Lambert
2005-Aug-31 17:34 UTC
App stuck in development environment, refuses to run in production
Hi all, Need some help here. Normally, I''ve been running under development version, occasionally switching to production for speed checks. This has always worked well, except now, when I actually want to go live and run in production full time, -e production doesn''t seem to have any effect. Erroring pages still display TMI (too much information), and allow you to jump into breakpointing. The log writes to production.log, and I can tell that the correct environments/*.rb file is loaded, but the error display is a problem. Can someone point me at a place to look to start debugging? Thanks, - Chris
Pat Maddox
2005-Aug-31 18:16 UTC
Re: App stuck in development environment, refuses to run in production
Are you seeing the errors from remote machines in addition to the local machine? I read a while back that Rails will still display full errors if you make requests from the local machine, but the no-info errors for remote requests. That''s to aide developers in debugging production apps. On 8/31/05, Chris Lambert <chris-1vnkWVZi4QaVc3sceRu5cw@public.gmane.org> wrote:> Hi all, > > Need some help here. Normally, I''ve been running under development > version, occasionally switching to production for speed checks. This > has always worked well, except now, when I actually want to go live > and run in production full time, -e production doesn''t seem to have > any effect. Erroring pages still display TMI (too much information), > and allow you to jump into breakpointing. The log writes to > production.log, and I can tell that the correct environments/*.rb file > is loaded, but the error display is a problem. > > Can someone point me at a place to look to start debugging? > > Thanks, > > - Chris > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Rick Olson
2005-Aug-31 18:58 UTC
Re: App stuck in development environment, refuses to run in production
On 8/31/05, Chris Lambert <chris-1vnkWVZi4QaVc3sceRu5cw@public.gmane.org> wrote:> Hi all, > > Need some help here. Normally, I''ve been running under development > version, occasionally switching to production for speed checks. This > has always worked well, except now, when I actually want to go live > and run in production full time, -e production doesn''t seem to have > any effect. Erroring pages still display TMI (too much information), > and allow you to jump into breakpointing. The log writes to > production.log, and I can tell that the correct environments/*.rb file > is loaded, but the error display is a problem. > > Can someone point me at a place to look to start debugging? > > Thanks, > > - ChrisIf I recall, the error pages show all that information if it''s a local request. Development just assumes that for all connections. -- rick http://techno-weenie.net
Joe Van Dyk
2005-Aug-31 19:44 UTC
Re: App stuck in development environment, refuses to run in production
On 8/31/05, Chris Lambert <chris-1vnkWVZi4QaVc3sceRu5cw@public.gmane.org> wrote:> Hi all, > > Need some help here. Normally, I''ve been running under development > version, occasionally switching to production for speed checks. This > has always worked well, except now, when I actually want to go live > and run in production full time, -e production doesn''t seem to have > any effect. Erroring pages still display TMI (too much information), > and allow you to jump into breakpointing. The log writes to > production.log, and I can tell that the correct environments/*.rb file > is loaded, but the error display is a problem.What error is being displayed? The full log and trace? You can set the log level in production, you know.> > Can someone point me at a place to look to start debugging? > > Thanks, > > - Chris > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Chris Lambert
2005-Aug-31 19:44 UTC
Re: App stuck in development environment, refuses to run in production
Ah, this could be a problem. I''m integrating the app behind a legacy server with mod_proxy, so all requests appear to be coming from localhost. Can I disable this functionality? - Chris On 8/31/05, Rick Olson <technoweenie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 8/31/05, Chris Lambert <chris-1vnkWVZi4QaVc3sceRu5cw@public.gmane.org> wrote: > > Hi all, > > > > Need some help here. Normally, I''ve been running under development > > version, occasionally switching to production for speed checks. This > > has always worked well, except now, when I actually want to go live > > and run in production full time, -e production doesn''t seem to have > > any effect. Erroring pages still display TMI (too much information), > > and allow you to jump into breakpointing. The log writes to > > production.log, and I can tell that the correct environments/*.rb file > > is loaded, but the error display is a problem. > > > > Can someone point me at a place to look to start debugging? > > > > Thanks, > > > > - Chris > > If I recall, the error pages show all that information if it''s a local > request. Development just assumes that for all connections. > > -- > rick > http://techno-weenie.net > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Chris Lambert
2005-Aug-31 19:51 UTC
Re: App stuck in development environment, refuses to run in production
Nothing like digging through the source. The simple solution is to override local_request? to always return false. This is checked against 127.0.0.1, and is provided as a method so that people can *expand* upon the list of "local" addresses, but works just as well since I can disable all local addresses. A better solution might be to check in a X-FORWARDED-FOR header (probably present in the request object somewhere). - Chris On 8/31/05, Chris Lambert <chris-1vnkWVZi4QaVc3sceRu5cw@public.gmane.org> wrote:> Ah, this could be a problem. I''m integrating the app behind a legacy > server with mod_proxy, so all requests appear to be coming from > localhost. Can I disable this functionality? > > - Chris > > On 8/31/05, Rick Olson <technoweenie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On 8/31/05, Chris Lambert <chris-1vnkWVZi4QaVc3sceRu5cw@public.gmane.org> wrote: > > > Hi all, > > > > > > Need some help here. Normally, I''ve been running under development > > > version, occasionally switching to production for speed checks. This > > > has always worked well, except now, when I actually want to go live > > > and run in production full time, -e production doesn''t seem to have > > > any effect. Erroring pages still display TMI (too much information), > > > and allow you to jump into breakpointing. The log writes to > > > production.log, and I can tell that the correct environments/*.rb file > > > is loaded, but the error display is a problem. > > > > > > Can someone point me at a place to look to start debugging? > > > > > > Thanks, > > > > > > - Chris > > > > If I recall, the error pages show all that information if it''s a local > > request. Development just assumes that for all connections. > > > > -- > > rick > > http://techno-weenie.net > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
Ezra Zygmuntowicz
2005-Aug-31 20:18 UTC
Re: App stuck in development environment, refuses to run in production
Well rails has a little trick up its sleeve that is probably throwing you off. Even in production mode if you are on the same computer as the server it will still show you development error messages. Is this what''s happening to you? HTH - -Ezra On Aug 31, 2005, at 10:34 AM, Chris Lambert wrote:> Hi all, > > Need some help here. Normally, I''ve been running under development > version, occasionally switching to production for speed checks. This > has always worked well, except now, when I actually want to go live > and run in production full time, -e production doesn''t seem to have > any effect. Erroring pages still display TMI (too much information), > and allow you to jump into breakpointing. The log writes to > production.log, and I can tell that the correct environments/*.rb file > is loaded, but the error display is a problem. > > Can someone point me at a place to look to start debugging? > > Thanks, > > - Chris > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-Ezra Zygmuntowicz Yakima Herald-Republic WebMaster 509-577-7732 ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org
Dan Sketcher
2005-Sep-02 00:58 UTC
Re: App stuck in development environment, refuses to run in production
> A better solution might be to check in a X-FORWARDED-FOR header > (probably present in the request object somewhere). >A method you might be interested in in ''request.remote_ip()'', which is in ''actionpack/lib/action_controller/request.rb'' - I had exactly the same problem as you :)