I have an standard Apache2+mod_fcgi+Rails layout. The application has a few of my own .rb files under /lib/ which I require in /config/ environment.rb. When running through Mongrel/Webrick, I can do require ''lib/mylib.rb'', but in the FastCGI environment (probably because the application''s runtime working directory has moved from / to /public/) I all requires in / config/environment.rb fail unless I put a ../ in fron of each path. I''ve tried googling on how to solve this issue but without results. The Apache2+mod_fcgi layout should be pretty common so I don''t understand why this issue even came up. Should I even be requiring files in /config/environment.rb? Might it be that because the working directory is /public/ instead of /, file uploads (using file_column) are also failing? Because right now they are. There might be a connection between those two problems. Regards, Erik Allik --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
eallik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Apr-02 12:30 UTC
Re: Apache+FastCGI working dir problem
I did a check on Apache access.log and error.log and Rails''s own /log/ production.log. * access.log shows an incoming POST request when I save the model with uploaded file data. * error.log does not show anything. * /log/production.log logs all requests except for the one that is my file upload POST request Could mod_fcgi be incorrectly directing multipart POST requests to the Rails FastCGI process? Erik On Apr 2, 1:36 pm, Erik Allik <eal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have an standard Apache2+mod_fcgi+Rails layout. The application has > a few of my own .rb files under /lib/ which I require in /config/ > environment.rb. > When running through Mongrel/Webrick, I can do require ''lib/mylib.rb'', > but in the FastCGI environment (probably because the application''s > runtime > working directory has moved from / to /public/) I all requires in / > config/environment.rb fail unless I put a ../ in fron of each path. > > I''ve tried googling on how to solve this issue but without results. > The Apache2+mod_fcgi layout should be pretty common so I don''t > understand why this issue even came up. > Should I even be requiring files in /config/environment.rb? > > Might it be that because the working directory is /public/ instead > of /, file uploads (using file_column) are also failing? Because right > now they are. > There might be a connection between those two problems. > > Regards, > Erik Allik--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
eallik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Apr-02 12:39 UTC
Re: Apache+FastCGI working dir problem
I solved the working dir problem by not require''ing ''lib/mylib'' but simply ''mylib'' instead. But I still need help with the file upload problem. Erik On Apr 2, 3:30 pm, "eal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <eal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I did a check on Apache access.log and error.log and Rails''s own /log/ > production.log. > * access.log shows an incoming POST request when I save the model with > uploaded file data. > * error.log does not show anything. > * /log/production.log logs all requests except for the one that is my > file upload POST request > > Could mod_fcgi be incorrectly directing multipart POST requests to the > Rails FastCGI process? > > Erik > > On Apr 2, 1:36 pm, Erik Allik <eal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I have an standard Apache2+mod_fcgi+Rails layout. The application has > > a few of my own .rb files under /lib/ which I require in /config/ > > environment.rb. > > When running through Mongrel/Webrick, I can do require ''lib/mylib.rb'', > > but in the FastCGI environment (probably because the application''s > > runtime > > working directory has moved from / to /public/) I all requires in / > > config/environment.rb fail unless I put a ../ in fron of each path. > > > I''ve tried googling on how to solve this issue but without results. > > The Apache2+mod_fcgi layout should be pretty common so I don''t > > understand why this issue even came up. > > Should I even be requiring files in /config/environment.rb? > > > Might it be that because the working directory is /public/ instead > > of /, file uploads (using file_column) are also failing? Because right > > now they are. > > There might be a connection between those two problems. > > > Regards, > > Erik Allik--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hey... I had the same problem with uploads... I try to solve it for the last 2 days, without result :-( Did you solve it??? Regards engineer --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---