When running on the Webrick server (script/server), my app works fine. When running on Apache 2.0.52, I get the dreaded ''unitialized constant Merge'' error. Merge is the name of my model, the controller is MergesController. The deadline looms, any help appreciated! Thanks! Regards, JJ
Anyone? I can post code, but don''t see the need since it works okay with Webrick. I also just installed the app on WindowsXP running XAMPP, and get the same results with Apache. Haven''t tried Webrick on that box, but will shortly. Thanks in advance! Regards, JJ On 01-Mar-2005, at 20:17, John Johnson wrote:> When running on the Webrick server (script/server), my app works fine. > When running on Apache 2.0.52, I get the dreaded ''unitialized constant > Merge'' error. Merge is the name of my model, the controller is > MergesController. > > The deadline looms, any help appreciated! > > Thanks! > > Regards, > JJ > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
John Johnson
2005-Mar-03 01:01 UTC
Re: App behaves differently on Apache and Webrick (Rails bug?)
Okay, I fixed this, but I would think it''s an undocumented feature in dependencies.rb (or elsewhere). I set a breakpoint here (dependencies.rb, around line 56) def const_missing(class_id) begin breakpoint require_or_load(class_id.to_s.demodulize.underscore) in IRB I did: class_id.to_s.demodulize.underscore "merge" so far so good. I tried: require_or_load(class_id.to_s.demodulize.underscore) and it barfed with a load error on another module of mine, gkntag/cutparts, which is required in merge.rb. As I said, this runs fine under Webrick. I changed the requires in merge.rb to: require RAILS_ROOT + ''gkntag/cutparts'' require RAILS_ROOT + ''gkntag/filepair'' and it works fine under Apache and Webrick. My partial directory structure: vcon/ gkntag/ cutparts.rb filepair.rb app/ models/ merge.rb Regards, JJ On 02-Mar-2005, at 17:31, John Johnson wrote:> Anyone? > > I can post code, but don''t see the need since it works okay with > Webrick. I also just installed the app on WindowsXP running XAMPP, and > get the same results with Apache. Haven''t tried Webrick on that box, > but will shortly. > > Thanks in advance! > > Regards, > JJ > > On 01-Mar-2005, at 20:17, John Johnson wrote: > >> When running on the Webrick server (script/server), my app works >> fine. When running on Apache 2.0.52, I get the dreaded ''unitialized >> constant Merge'' error. Merge is the name of my model, the controller >> is MergesController. >> >> The deadline looms, any help appreciated! >> >> Thanks! >> >> Regards, >> JJ >> >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Nicholas Seckar
2005-Mar-03 07:21 UTC
Re: App behaves differently on Apache and Webrick (Rails bug?)
The webrick server is pretty persistent in ensuring that the PWD is RAILS_ROOT. This may be related to your issue. I was under the impression that your non-Rails Ruby code should reside in your application''s lib/ folder, which is added to Ruby''s load path. -- Nicholas Seckar aka. Ulysses
Maybe Matching Threads
- Error booting an opensuse iso image
- Asterisk BlindTransfer behaves differently in version 1.0 and 1.2
- samba authentication behaves differently between windows and samba clients
- readLines() for non-blocking pipeline behaves differently in R 3.5
- readLines() for non-blocking pipeline behaves differently in R 3.5