22 sudo mv camping.rb camping-abridged.rb 23 sudo mv camping-unabridged.rb camping.rb when running into problems, the abridged version of camping is rather difficult to debug. so I''m moving to unabridged, but I''m getting this error. [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:100:in `const_missing'' [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] : [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] uninitialized constant X [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] ( [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] NameError [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] ) [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in `const_missing'' [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in `const_missing'' [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom (eval):682:in `run'' [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom /home/mathieu/mv/rf/public/diary.cgi:341 [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] Premature end of script headers: diary.cgi -- gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static -ldl -lcrypt -lm -o ruby Everyone is trying their hardest to do their job but management has set it up so that it''s impossible. Take the control over your money, track your expenses http://justbudget.com Mathieu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20060724/f9eda083/attachment-0001.html
X = Controllers def run(r=$stdin,e=ENV) X.M k,a=X.D un("/#{e[''PATH_INFO'']}".gsub(/\/+/,''/'')) k.new(r,e,(m=e[''REQUEST_METHOD'']||"GET")).service *a rescue Exception=>x X::ServerError.new(r,e,''get'').service(k,m,x) end placing a X = Controllers above the run method fixed it. On 7/24/06, Mathieu Jobin <mathieu at justbudget.com> wrote:> > 22 sudo mv camping.rb camping-abridged.rb > 23 sudo mv camping-unabridged.rb camping.rb > > when running into problems, the abridged version of camping is rather > difficult to debug. > so I''m moving to unabridged, but I''m getting this error. > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:100:in > `const_missing'' > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] : > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] uninitialized > constant X > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] ( > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] NameError > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] ) > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in > `const_missing'' > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in > `const_missing'' > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom > (eval):682:in `run'' > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom > /home/mathieu/mv/rf/public/diary.cgi:341 > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] Premature end > of script headers: diary.cgi > > > -- > gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static > -ldl -lcrypt -lm -o ruby > Everyone is trying their hardest to do their job but management has set it > up so that it''s impossible. > Take the control over your money, track your expenses > http://justbudget.com > > Mathieu >-- gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static -ldl -lcrypt -lm -o ruby Everyone is trying their hardest to do their job but management has set it up so that it''s impossible. Take the control over your money, track your expenses http://justbudget.com Mathieu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20060724/65ae189f/attachment.html
still, in camping 1.4.138 line 88 of "camping/fastcgi.rb" is missing a + at the end. On 7/24/06, Mathieu Jobin <mathieu at justbudget.com> wrote:> > X = Controllers > def run(r=$stdin,e=ENV) > X.M > k,a=X.D un("/#{e[''PATH_INFO'']}".gsub(/\/+/,''/'')) > k.new(r,e,(m=e[''REQUEST_METHOD'']||"GET")).service *a > rescue Exception=>x > X::ServerError.new(r,e,''get'').service(k,m,x) > end > > placing a X = Controllers above the run method fixed it. > > > On 7/24/06, Mathieu Jobin <mathieu at justbudget.com> wrote: > > > > 22 sudo mv camping.rb camping-abridged.rb > > 23 sudo mv camping-unabridged.rb camping.rb > > > > when running into problems, the abridged version of camping is rather > > difficult to debug. > > so I''m moving to unabridged, but I''m getting this error. > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] > > /usr/local/lib/ruby/gems/1.8/gems/activesupport- 1.3.1/lib/active_support/dependencies.rb:100:in > > `const_missing'' > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] : > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] uninitialized > > constant X > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] ( > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] NameError > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] ) > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom > > /usr/local/lib/ruby/gems/1.8/gems/activesupport- 1.3.1/lib/active_support/dependencies.rb:131:in > > `const_missing'' > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom > > /usr/local/lib/ruby/gems/1.8/gems/activesupport- 1.3.1/lib/active_support/dependencies.rb:133:in > > `const_missing'' > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom > > (eval):682:in `run'' > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom > > /home/mathieu/mv/rf/public/diary.cgi:341 > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] Premature end > > of script headers: diary.cgi > > > > > > -- > > gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static > > -ldl -lcrypt -lm -o ruby > > Everyone is trying their hardest to do their job but management has set > > it up so that it''s impossible. > > Take the control over your money, track your expenses > > http://justbudget.com > > > > Mathieu > > > > > > -- > gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static > -ldl -lcrypt -lm -o ruby > Everyone is trying their hardest to do their job but management has set it > up so that it''s impossible. > Take the control over your money, track your expenses > http://justbudget.com > > Mathieu >-- gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static -ldl -lcrypt -lm -o ruby Everyone is trying their hardest to do their job but management has set it up so that it''s impossible. Take the control over your money, track your expenses http://justbudget.com Mathieu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20060724/a3a5a676/attachment.html
Yes, unabridged is mostry there for the doc, but this is good. -- Cheers, zimbatm http://zimbatm.oree.ch
another problem.... for some reason on line 75 of /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.138/lib/camping/fastcgi.rb req.env[''PATH_INFO''] is nil making any of my FastCGI app to error out. adding .to_s skip that error, I''m not sure is that PATH_INFO var next error happens in camping-unabridged line 433 def to_s "Status: #{@status}#{Z+ at headers.map{|k,v|[*v].map{|x|"#{k}: #{x}"}}* Z+Z*2+ at body}" end TypeError can''t convert Diary::Mab into String which line is very hard to debug. first its rather unreadable, second his output is crucial for the HTTP response. is it @body the problem ? On 7/24/06, Mathieu Jobin <mathieu at justbudget.com> wrote:> > still, in camping 1.4.138 > line 88 of "camping/fastcgi.rb" is missing a + at the end. > > > > > On 7/24/06, Mathieu Jobin < mathieu at justbudget.com> wrote: > > > > X = Controllers > > def run(r=$stdin,e=ENV) > > X.M > > k,a=X.D un("/#{e[''PATH_INFO'']}".gsub(/\/+/,''/'')) > > k.new(r,e,(m=e[''REQUEST_METHOD'']||"GET")).service *a > > rescue Exception=>x > > X::ServerError.new(r,e,''get'').service(k,m,x) > > end > > > > placing a X = Controllers above the run method fixed it. > > > > > > > > On 7/24/06, Mathieu Jobin <mathieu at justbudget.com> wrote: > > > > > > 22 sudo mv camping.rb camping-abridged.rb > > > 23 sudo mv camping-unabridged.rb camping.rb > > > > > > when running into problems, the abridged version of camping is ratherdifficult to debug.> > > so I''m moving to unabridged, but I''m getting this error. > > > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100 ]/usr/local/lib/ruby/gems/1.8/gems/activesupport- 1.3.1/lib/active_support/dependencies.rb:100:in `const_missing''> > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] : > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100]uninitialized constant X> > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] ( > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] NameError > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] ) > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom/usr/local/lib/ruby/gems/1.8/gems/activesupport- 1.3.1/lib/active_support/dependencies.rb:131:in `const_missing''> > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100 ] \tfrom/usr/local/lib/ruby/gems/1.8/gems/activesupport- 1.3.1/lib/active_support/dependencies.rb:133:in `const_missing''> > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom(eval):682:in `run''> > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100 ] \tfrom/home/mathieu/mv/rf/public/diary.cgi:341> > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100 ] Prematureend of script headers: diary.cgi> > > > > > > > > -- > > > gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static-ldl -lcrypt -lm -o ruby> > > Everyone is trying their hardest to do their job but management hasset it up so that it''s impossible.> > > Take the control over your money, track your expenseshttp://justbudget.com> > > > > > > > > Mathieu > > > > > > > > -- > > gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static-ldl -lcrypt -lm -o ruby> > Everyone is trying their hardest to do their job but management has setit up so that it''s impossible.> > Take the control over your money, track your expenseshttp://justbudget.com> > > > Mathieu > > > > -- > gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static-ldl -lcrypt -lm -o ruby> Everyone is trying their hardest to do their job but management has set itup so that it''s impossible.> Take the control over your money, track your expenseshttp://justbudget.com> > Mathieu-- gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static -ldl -lcrypt -lm -o ruby Everyone is trying their hardest to do their job but management has set it up so that it''s impossible. Take the control over your money, track your expenses http://justbudget.com Mathieu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20060724/18bed35c/attachment-0001.html
I have been able to get a .inspect of @body by passing it into a @headers field ;) #<Diary::Mab:0x87e64d4 @indent=0, @streams=[["<h1>Camping Problem!</h1><h2>/diary.fcgi not found</h2>", "<inspect", "/", ">"]], @tagset=Markaby::XHTMLTransitional, @builder=<h1>Camping Problem!</h1><h2>/diary.fcgi not found</h2><inspect/><inspect/>, @output_helpers=true, @auto_validation=true, @helpers=nil, @output_xml_instruction=true, @image_tag_options={:border=>"0", :alt=>""}, @assigns={}, @output_meta_tag=true> so, I''m getting this error again /diary.fcgi not found. so I try changing .start into .serve and it''s just worse. first I rename my app to .rb because .serve is scanning for .rb files. although .serve could be change to support .fcgi something like this.... Dir[File.join(path, ''*.{rb,fcgi}'')].each &script_load fast.start do |dir, app| Dir[File.join(path, dir, ''*.{rb,fcgi}'')].each do |script| smount = "/" + File.gsub(/\.(rb|fcgi)$/, '''') script_load[script] unless @mounts.has_key? smount end end should do fine and I''m getting the following error. /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:184:in `establish_connection'': ActiveRecord::AdapterNotSpecified (ActiveRecord::AdapterNotSpecified) from /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.138/lib/camping/reloader.rb:139:in `conditional_connect'' from /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.138/lib/camping/reloader.rb:80:in `load_app'' from /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.138/lib/camping/reloader.rb:40:in `initialize'' from /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.138/lib/camping/fastcgi.rb:123:in `serve'' from /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.138/lib/camping/fastcgi.rb:127:in `serve'' from /home/mathieu/mv/rf/public/diary.rb:346 !! trouble loading diary: [TypeError] (eval):552: superclass mismatch for class NotFound On 7/24/06, Mathieu Jobin <mathieu at justbudget.com> wrote:> > another problem.... > for some reason > on line 75 of > /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.138/lib/camping/fastcgi.rb > req.env[''PATH_INFO''] is nil > making any of my FastCGI app to error out. > adding .to_s skip that error, I''m not sure is that PATH_INFO var > > next error happens in camping-unabridged line 433 > > def to_s > "Status: #{@status}#{Z+ at headers.map{|k,v|[*v].map{|x|"#{k}: #{x}"}}* > Z+Z*2+ at body}" > end > > TypeError can''t convert Diary::Mab into String > > which line is very hard to debug. first its rather unreadable, second his > output is crucial for the HTTP response. > is it @body the problem ? > > > On 7/24/06, Mathieu Jobin < mathieu at justbudget.com> wrote: > > > > still, in camping 1.4.138 > > line 88 of "camping/fastcgi.rb" is missing a + at the end. > > > > > > > > > > On 7/24/06, Mathieu Jobin < mathieu at justbudget.com> wrote: > > > > > > X = Controllers > > > def run(r=$stdin,e=ENV) > > > X.M > > > k,a=X.D un("/#{e[''PATH_INFO'']}".gsub(/\/+/,''/'')) > > > k.new(r,e,(m=e[''REQUEST_METHOD'']||"GET")).service *a > > > rescue Exception=>x > > > X::ServerError.new(r,e,''get'').service(k,m,x) > > > end > > > > > > placing a X = Controllers above the run method fixed it. > > > > > > > > > > > > On 7/24/06, Mathieu Jobin <mathieu at justbudget.com > wrote: > > > > > > > > 22 sudo mv camping.rb camping-abridged.rb > > > > 23 sudo mv camping-unabridged.rb camping.rb > > > > > > > > when running into problems, the abridged version of camping is > rather difficult to debug. > > > > so I''m moving to unabridged, but I''m getting this error. > > > > > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100 ] > /usr/local/lib/ruby/gems/1.8/gems/activesupport- 1.3.1/lib/active_support/dependencies.rb:100:in > `const_missing'' > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] : > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] > uninitialized constant X > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] ( > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] > NameError > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] ) > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom > /usr/local/lib/ruby/gems/1.8/gems/activesupport- 1.3.1/lib/active_support/dependencies.rb:131:in > `const_missing'' > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100 ] \tfrom > /usr/local/lib/ruby/gems/1.8/gems/activesupport- 1.3.1/lib/active_support/dependencies.rb:133:in > `const_missing'' > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom > (eval):682:in `run'' > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100 ] \tfrom > /home/mathieu/mv/rf/public/diary.cgi:341 > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100 ] > Premature end of script headers: diary.cgi > > > > > > > > > > > > -- > > > > gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static > -ldl -lcrypt -lm -o ruby > > > > Everyone is trying their hardest to do their job but management has > set it up so that it''s impossible. > > > > Take the control over your money, track your expenses > http://justbudget.com > > > > > > > > > > > > Mathieu > > > > > > > > > > > > -- > > > gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static > -ldl -lcrypt -lm -o ruby > > > Everyone is trying their hardest to do their job but management has > set it up so that it''s impossible. > > > Take the control over your money, track your expenses > http://justbudget.com > > > > > > Mathieu > > > > > > > > -- > > gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static > -ldl -lcrypt -lm -o ruby > > Everyone is trying their hardest to do their job but management has set > it up so that it''s impossible. > > Take the control over your money, track your expenses > http://justbudget.com > > > > Mathieu > > > > -- > gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static > -ldl -lcrypt -lm -o ruby > Everyone is trying their hardest to do their job but management has set it > up so that it''s impossible. > Take the control over your money, track your expenses > http://justbudget.com > > Mathieu >-- gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static -ldl -lcrypt -lm -o ruby Everyone is trying their hardest to do their job but management has set it up so that it''s impossible. Take the control over your money, track your expenses http://justbudget.com Mathieu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20060724/da11d9ec/attachment.html
how are you maintaining this camping.rb file ? I thought you were editing the unabridged version which was automatically compressed into camping.rb no ? On 7/24/06, Jonas Pfenniger <zimba.tm at gmail.com> wrote:> > Yes, unabridged is mostry there for the doc, but this is good. > > -- > Cheers, > zimbatm > > http://zimbatm.oree.ch > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list >-- gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static -ldl -lcrypt -lm -o ruby Everyone is trying their hardest to do their job but management has set it up so that it''s impossible. Take the control over your money, track your expenses http://justbudget.com Mathieu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20060724/aa1cb5b4/attachment.html
did anyone ever got camping to work on Apache/FastCGI ? (14.138) On 7/24/06, Mathieu Jobin <mathieu at justbudget.com> wrote:> > how are you maintaining this camping.rb file ? > I thought you were editing the unabridged version which was automatically > compressed into camping.rb > no ? > > > On 7/24/06, Jonas Pfenniger <zimba.tm at gmail.com> wrote: > > > > Yes, unabridged is mostry there for the doc, but this is good. > > > > -- > > Cheers, > > zimbatm > > > > http://zimbatm.oree.ch > > _______________________________________________ > > Camping-list mailing list > > Camping-list at rubyforge.org > > http://rubyforge.org/mailman/listinfo/camping-list > > > > > > -- > gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static > -ldl -lcrypt -lm -o ruby > Everyone is trying their hardest to do their job but management has set it > up so that it''s impossible. > Take the control over your money, track your expenses > http://justbudget.com > > Mathieu >-- gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static -ldl -lcrypt -lm -o ruby Everyone is trying their hardest to do their job but management has set it up so that it''s impossible. Take the control over your money, track your expenses http://justbudget.com Mathieu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20060724/6d00a65a/attachment-0001.html
On 24/07/06, Mathieu Jobin <mathieu at justbudget.com> wrote:> how are you maintaining this camping.rb file ? > I thought you were editing the unabridged version which was automatically > compressed into camping.rb > no ?No, camping.rb is recoded by hand. This is why both files sometimes get out of sync. I''m sorry I''m not using fcgi. You should try to get the following : * Camping from SVN, and apply the [PATCH] AR fixes patch from Trac. * Markaby from SVN, the xhtml-careful branch. And join #camping on freenode ;-) -- Cheers, zimbatm http://zimbatm.oree.ch
may I ask how are you recoded by hand? you are editing the file directly without uncompressing it ? would not that be a good idea to always edit the unabridged version and relaunch that script that removed comments and compress the lines? this way, it would be easier for the developer and both version would be in sync. nothing more than my opinion. On 7/24/06, Jonas Pfenniger <zimba.tm at gmail.com> wrote:> > On 24/07/06, Mathieu Jobin <mathieu at justbudget.com> wrote: > > how are you maintaining this camping.rb file ? > > I thought you were editing the unabridged version which was > automatically > > compressed into camping.rb > > no ? > > No, camping.rb is recoded by hand. This is why both files sometimes > get out of sync. > I''m sorry I''m not using fcgi. You should try to get the following : > * Camping from SVN, and apply the [PATCH] AR fixes patch from Trac. > * Markaby from SVN, the xhtml-careful branch. > > And join #camping on freenode ;-) > > -- > Cheers, > zimbatm > > http://zimbatm.oree.ch > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list >-- gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static -ldl -lcrypt -lm -o ruby Everyone is trying their hardest to do their job but management has set it up so that it''s impossible. Take the control over your money, track your expenses http://justbudget.com Mathieu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20060724/27b41af2/attachment.html
On 24-jul-2006, at 11:08, Jonas Pfenniger wrote:> On 24/07/06, Mathieu Jobin <mathieu at justbudget.com> wrote: >> how are you maintaining this camping.rb file ? >> I thought you were editing the unabridged version which was >> automatically >> compressed into camping.rb >> no ? > > No, camping.rb is recoded by hand. This is why both files sometimes > get out of sync. > I''m sorry I''m not using fcgi. You should try to get the following : > * Camping from SVN, and apply the [PATCH] AR fixes patch from Trac. > * Markaby from SVN, the xhtml-careful branch. > > And join #camping on freenode ;-)I did experience a lot of trouble running camping with cgi under apache. I never got fcgi working. Most of the problems have to do with SCRIPT_NAME and path related stuff. I had to do the following to get it to work: module ForestWatcher def service(*a) @root = ENV[''SCRIPT_NAME''].sub ''/forestwatcher.rb'', '''' unless ENV [''SCRIPT_NAME''].nil? super(*a) end end
On 24-jul-2006, at 11:14, Mathieu Jobin wrote:> may I ask how are you recoded by hand? you are editing the file > directly without uncompressing it ? > would not that be a good idea to always edit the unabridged version > and relaunch that script that removed comments and compress the > lines? this way, it would be easier for the developer and both > version would be in sync. > > nothing more than my opinion.If I understand correctly the camping.rb file is maintained by hand to be able to minimize the size of the file to the full extend. If some script would produce this it might not be optimal.
On 24/07/06, Manfred Stienstra <manfred at gmail.com> wrote:> If I understand correctly the camping.rb file is maintained by hand > to be able to minimize the size of the file to the full extend. If > some script would produce this it might not be optimal.Yes this is right. I''ve started a ruby-compresser project on my disk but didn''t get quite far. The problem is that you''ll need a lexer and sexp processor to output compressed code and you''ll have to redefine each element of the ruby language which is quite long to do. -- Cheers, zimbatm http://zimbatm.oree.ch
On Mon, Jul 24, 2006 at 05:36:12PM +0900, Mathieu Jobin wrote:> how are you maintaining this camping.rb file ? > I thought you were editing the unabridged version which was automatically > compressed into camping.rbIt''s just the opposite. I write camping.rb and expand it into camping-unabridged.rb. Thankyou for your patches, I will merge them today. _why
On Mon, Jul 24, 2006 at 04:39:20PM +0900, Mathieu Jobin wrote:> another problem.... > for some reason > on line 75 of > /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.138/lib/camping/fastcgi.rb > req.env[''PATH_INFO''] is nil > making any of my FastCGI app to error out. > adding .to_s skip that error, I''m not sure is that PATH_INFO varThis could be how Apache/FastCGI works. I have not tried with Apache/FastCGI yet, so I will try it and get back to you. Okay, I see that you are only serving a single file now, Mathieu. I''ve just released the 1.4.139 gem, which will let you pass a single script into .serve: #!/usr/local/bin/ruby require ''rubygems'' require ''camping/fastcgi'' Camping::Models::Base.establish_connection :adapter => ''sqlite3'', :database => "/var/www/camping.db" Camping::FastCGI.serve("/var/www/diary.rb") Or tarball is available: http://code.whytheluckystiff.net/dist/camping-1.4.139.tgz _why
thank you very much. but quick question, isn''t .start the same as .serve for a single file ? is .start broken or usefull only for mongrel and friends? thanks for the updated gem, I''ll try it today. Mathieu On 7/25/06, why the lucky stiff <why at whytheluckystiff.net> wrote:> > On Mon, Jul 24, 2006 at 04:39:20PM +0900, Mathieu Jobin wrote: > > another problem.... > > for some reason > > on line 75 of > > /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.138/lib/camping/fastcgi.rb > > req.env[''PATH_INFO''] is nil > > making any of my FastCGI app to error out. > > adding .to_s skip that error, I''m not sure is that PATH_INFO var > > This could be how Apache/FastCGI works. I have not tried with > Apache/FastCGI > yet, so I will try it and get back to you. > > Okay, I see that you are only serving a single file now, Mathieu. I''ve > just > released the 1.4.139 gem, which will let you pass a single script into > .serve: > > #!/usr/local/bin/ruby > require ''rubygems'' > require ''camping/fastcgi'' > Camping::Models::Base.establish_connection :adapter => ''sqlite3'', > :database => "/var/www/camping.db" > Camping::FastCGI.serve("/var/www/diary.rb") > > Or tarball is available: > > http://code.whytheluckystiff.net/dist/camping-1.4.139.tgz > > _why > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list >-- gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static -ldl -lcrypt -lm -o ruby Everyone is trying their hardest to do their job but management has set it up so that it''s impossible. Take the control over your money, track your expenses http://justbudget.com Mathieu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20060725/694fa755/attachment-0002.html
On Tue, Jul 25, 2006 at 09:19:34AM +0900, Mathieu Jobin wrote:> thank you very much. > but quick question, isn''t .start the same as .serve for a single file ? is > .start broken or usefull only for mongrel and friends?Camping::FastCGI#serve loads the app(s) through Camping::Reloader, which will refresh the script should it change. Camping::FastCGI#start mounts a single class at the route. It is less useful, but I''m keeping it as an example of how to use the app without the automatic reload. For example, if we get other frameworks to run playfully alongside Camping, then people may want to use a myriad of frameworks to do their thing. _why
CGI works fine for me. only FastCGI is a problem. your module ForestWatcher, is it for CGI or FastCGI ? Mathieu On 7/24/06, Manfred Stienstra <manfred at gmail.com> wrote:> > > On 24-jul-2006, at 11:08, Jonas Pfenniger wrote: > > > On 24/07/06, Mathieu Jobin <mathieu at justbudget.com> wrote: > >> how are you maintaining this camping.rb file ? > >> I thought you were editing the unabridged version which was > >> automatically > >> compressed into camping.rb > >> no ? > > > > No, camping.rb is recoded by hand. This is why both files sometimes > > get out of sync. > > I''m sorry I''m not using fcgi. You should try to get the following : > > * Camping from SVN, and apply the [PATCH] AR fixes patch from Trac. > > * Markaby from SVN, the xhtml-careful branch. > > > > And join #camping on freenode ;-) > > I did experience a lot of trouble running camping with cgi under > apache. I never got fcgi working. Most of the problems have to do > with SCRIPT_NAME and path related stuff. I had to do the following to > get it to work: > > module ForestWatcher > def service(*a) > @root = ENV[''SCRIPT_NAME''].sub ''/forestwatcher.rb'', '''' unless ENV > [''SCRIPT_NAME''].nil? > super(*a) > end > end > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list >-- gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static -ldl -lcrypt -lm -o ruby Everyone is trying their hardest to do their job but management has set it up so that it''s impossible. Take the control over your money, track your expenses http://justbudget.com Mathieu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20060725/7537a2c4/attachment.html
On Jul 25, 2006, at 4:01 AM, Mathieu Jobin wrote:> CGI works fine for me. only FastCGI is a problem. > your module ForestWatcher, is it for CGI or FastCGIThe app is called ForestWatcher, and it''s running on CGI right now. Manfred