From his2000x at gmail.com Sun Mar 22 00:51:43 2009 From: his2000x at gmail.com (in-seok hwang) Date: Sun, 22 Mar 2009 13:51:43 +0900 Subject: hi all! Message-ID: hi all i'm can't speak english well.... i has something problem. i used gems list is.. mongrel-1.1.5 camping-1.5.180 and update now.. camping-1.9.300 so, My blog looks like an error on the server. my old code is .. 615 if __FILE__ == $0 616 require 'mongrel/camping' 617 618 Conf::Models::Base.establish_connection :adapter => 'sqlite3', :database => 'conf.db' 619 Conf::Models::Base.logger = Logger.new('conf.log') 620 Conf.create 621 622 config = Mongrel::Configurator.new :host => "0.0.0.0" do 623 listener :port => 80 do 624 uri "/", :handler => Mongrel::Camping::CampingHandler.new(Conf) 625 uri "/favicon", :handler => Mongrel::Error404Handler.new("") 626 trap("INT") { stop } 627 run 628 end 629 end 630 631 puts "** http://localhost:80/" 632 t = Time.now 633 @servertime=t 634 puts "?? ?? ?? : #{t.year}?#{t.month}?#{t.day}?#{t.hour}?#{t.min}?#{t.sec}?" 635 config.join 636 end and error code is, his at info105:~$ sudo ruby conf_mongrel1.9.rb ** http://localhost:80/ ?? ?? ?? : 2009?3?22?13?30?25? Sun Mar 22 13:30:31 +0900 2009: Read error: # is not a symbol> (eval):53:in `const_get' (eval):53:in `method_missing' /usr/local/lib/site_ruby/1.8/mongrel/camping.rb:53:in `process' /usr/local/lib/site_ruby/1.8/mongrel/camping.rb:52:in `synchronize' /usr/local/lib/site_ruby/1.8/mongrel/camping.rb:52:in `process' /usr/local/lib/site_ruby/1.8/mongrel.rb:159:in `process_client' /usr/local/lib/site_ruby/1.8/mongrel.rb:158:in `each' /usr/local/lib/site_ruby/1.8/mongrel.rb:158:in `process_client' /usr/local/lib/site_ruby/1.8/mongrel.rb:285:in `run' /usr/local/lib/site_ruby/1.8/mongrel.rb:285:in `initialize' /usr/local/lib/site_ruby/1.8/mongrel.rb:285:in `new' /usr/local/lib/site_ruby/1.8/mongrel.rb:285:in `run' /usr/local/lib/site_ruby/1.8/mongrel.rb:268:in `initialize' /usr/local/lib/site_ruby/1.8/mongrel.rb:268:in `new' /usr/local/lib/site_ruby/1.8/mongrel.rb:268:in `run' /usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:282:in `run' /usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:281:in `each' /usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:281:in `run' conf_mongrel1.9.rb:627:in `cloaker_' /usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:149:in `call' /usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:149:in `listener' conf_mongrel1.9.rb:623:in `cloaker_' /usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:50:in `call' /usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:50:in `initialize' conf_mongrel1.9.rb:622:in `new' conf_mongrel1.9.rb:622 plz help.. -------------- next part -------------- An HTML attachment was scrubbed... URL: From judofyr at gmail.com Sun Mar 22 04:53:43 2009 From: judofyr at gmail.com (Magnus Holm) Date: Sun, 22 Mar 2009 09:53:43 +0100 Subject: hi all! In-Reply-To: References: Message-ID: <391a49da0903220153q604405e3qedd152bc1574405e@mail.gmail.com> Hi! Camping has switched to Rack (http://rack.rubyforge.org) recently. This should work: if __FILE__ == $0 Conf::Models::Base.establish_connection :adapter => 'sqlite3', :database => 'conf.db' Conf::Models::Base.logger = Logger.new('conf.log') Conf.create app = Rack::Builder.new do use Rack::ContentLength run Conf end trap('INT') { exit } puts "** http://localhost:80/" t = Time.now @servertime=t puts "?? ?? ?? : #{t.year}?#{t.month}?#{t.day}?#{t.hour}?#{t.min}?#{t.sec}?" Rack::Handler::Mongrel.run(app, :Port => 80) end There are probably more changes you need to do with your code. Just post here if you're stuck and we'll figure out :-) If don't want to upgrade, you can keep using the old version of Camping by placing this at the top of the file: require 'rubygems' gem "camping", "=1.5.180" require 'camping' Good luck, and have fun with Camping! //Magnus Holm 2009/3/22 in-seok hwang > hi all > > i'm can't speak english well.... > > i has something problem. > > i used gems list is.. > mongrel-1.1.5 > camping-1.5.180 > > and update now.. > > camping-1.9.300 > > so, My blog looks like an error on the server. > > my old code is .. > > 615 if __FILE__ == $0 > 616 require 'mongrel/camping' > 617 > 618 Conf::Models::Base.establish_connection :adapter => 'sqlite3', > :database => 'conf.db' > 619 Conf::Models::Base.logger = Logger.new('conf.log') > 620 Conf.create > 621 > 622 config = Mongrel::Configurator.new :host => "0.0.0.0" do > 623 listener :port => 80 do > 624 uri "/", :handler => > Mongrel::Camping::CampingHandler.new(Conf) > 625 uri "/favicon", :handler => > Mongrel::Error404Handler.new("") > 626 trap("INT") { stop } > 627 run > 628 end > 629 end > 630 > 631 puts "** http://localhost:80/" > 632 t = Time.now > 633 @servertime=t > 634 puts "?? ?? ?? : > #{t.year}?#{t.month}?#{t.day}?#{t.hour}?#{t.min}?#{t.sec}?" > 635 config.join > 636 end > > and error code is, > > > his at info105:~$ sudo ruby conf_mongrel1.9.rb > ** http://localhost:80/ > ?? ?? ?? : 2009?3?22?13?30?25? > Sun Mar 22 13:30:31 +0900 2009: Read error: # # is not a symbol> > (eval):53:in `const_get' > (eval):53:in `method_missing' > /usr/local/lib/site_ruby/1.8/mongrel/camping.rb:53:in `process' > /usr/local/lib/site_ruby/1.8/mongrel/camping.rb:52:in `synchronize' > /usr/local/lib/site_ruby/1.8/mongrel/camping.rb:52:in `process' > /usr/local/lib/site_ruby/1.8/mongrel.rb:159:in `process_client' > /usr/local/lib/site_ruby/1.8/mongrel.rb:158:in `each' > /usr/local/lib/site_ruby/1.8/mongrel.rb:158:in `process_client' > /usr/local/lib/site_ruby/1.8/mongrel.rb:285:in `run' > /usr/local/lib/site_ruby/1.8/mongrel.rb:285:in `initialize' > /usr/local/lib/site_ruby/1.8/mongrel.rb:285:in `new' > /usr/local/lib/site_ruby/1.8/mongrel.rb:285:in `run' > /usr/local/lib/site_ruby/1.8/mongrel.rb:268:in `initialize' > /usr/local/lib/site_ruby/1.8/mongrel.rb:268:in `new' > /usr/local/lib/site_ruby/1.8/mongrel.rb:268:in `run' > /usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:282:in `run' > /usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:281:in `each' > /usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:281:in `run' > conf_mongrel1.9.rb:627:in `cloaker_' > /usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:149:in `call' > /usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:149:in `listener' > conf_mongrel1.9.rb:623:in `cloaker_' > /usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:50:in `call' > /usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:50:in `initialize' > conf_mongrel1.9.rb:622:in `new' > conf_mongrel1.9.rb:622 > > > plz help.. > > > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: From terragb at gmail.com Sun Mar 29 01:01:12 2009 From: terragb at gmail.com (Garret Buell) Date: Sat, 28 Mar 2009 22:01:12 -0700 Subject: Rack::Lint::LintError with latest camping and rack Message-ID: <54e0571c0903282201q7706313n32dd2ae2e23074a6@mail.gmail.com> I'm trying to use Camping from Magnus' repo (1.9.300) but running the blog.rb example (or anything for that matter) gives me Rack::Lint::LintError at / Content-Length header was 0, but should be 548 Ruby C:/ruby-1.8.7/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/lint.rb: in assert, line 16 Web GET localhost/ There are no errors on the camping output so I suspect something has changed with Rack. What version of Rack do people have the examples working with? Thanks, Garret Buell From terragb at gmail.com Sun Mar 29 01:06:57 2009 From: terragb at gmail.com (Garret Buell) Date: Sat, 28 Mar 2009 22:06:57 -0700 Subject: Rack::Lint::LintError with latest camping and rack In-Reply-To: <54e0571c0903282201q7706313n32dd2ae2e23074a6@mail.gmail.com> References: <54e0571c0903282201q7706313n32dd2ae2e23074a6@mail.gmail.com> Message-ID: <54e0571c0903282206s7831ed49t97aa3390b774595a@mail.gmail.com> Ok, scratch that last. Turns out camping works just fine with Rack 0.4 so it seems the change was with 0.9. I'm not too familiar with Rack -- what changes would we need to make to get camping working with Rack 0.9? Would we gain anything by making the switch? -Garret On Sat, Mar 28, 2009 at 10:01 PM, Garret Buell wrote: > I'm trying to use Camping from Magnus' repo (1.9.300) but running the > blog.rb example (or anything for that matter) gives me > Rack::Lint::LintError at / > Content-Length header was 0, but should be 548 > Ruby ? ?C:/ruby-1.8.7/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/lint.rb: > in assert, line 16 > Web ? ? GET localhost/ > > There are no errors on the camping output so I suspect something has > changed with Rack. What version of Rack do people have the examples > working with? > > Thanks, > Garret Buell > From paul at rouge-robot.com Sun Mar 29 13:52:03 2009 From: paul at rouge-robot.com (Paul Thompson) Date: Sun, 29 Mar 2009 10:52:03 -0700 Subject: Rack::Lint::LintError with latest camping and rack In-Reply-To: <54e0571c0903282206s7831ed49t97aa3390b774595a@mail.gmail.com> References: <54e0571c0903282201q7706313n32dd2ae2e23074a6@mail.gmail.com> <54e0571c0903282206s7831ed49t97aa3390b774595a@mail.gmail.com> Message-ID: <20090329175203.GA33016@rouge-robot.com> I was able to get camping 1.9 to work with rack 0.9 by using a copy pulled from the repository for rack listed on github. git clone git://github.com/rack/rack.git Paul On Sat, Mar 28, 2009 at 10:06:57PM -0700, Garret Buell wrote: > Ok, scratch that last. Turns out camping works just fine with Rack 0.4 > so it seems the change was with 0.9. I'm not too familiar with Rack -- > what changes would we need to make to get camping working with Rack > 0.9? Would we gain anything by making the switch? > > -Garret > > On Sat, Mar 28, 2009 at 10:01 PM, Garret Buell wrote: > > I'm trying to use Camping from Magnus' repo (1.9.300) but running the > > blog.rb example (or anything for that matter) gives me > > Rack::Lint::LintError at / > > Content-Length header was 0, but should be 548 > > Ruby ? ?C:/ruby-1.8.7/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/lint.rb: > > in assert, line 16 > > Web ? ? GET localhost/ > > > > There are no errors on the camping output so I suspect something has > > changed with Rack. What version of Rack do people have the examples > > working with? > > > > Thanks, > > Garret Buell > > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list From julian.tarkhanov at gmail.com Sun Mar 29 14:45:45 2009 From: julian.tarkhanov at gmail.com (Julik Tarkhanov) Date: Sun, 29 Mar 2009 20:45:45 +0200 Subject: Rack::Lint::LintError with latest camping and rack In-Reply-To: <54e0571c0903282206s7831ed49t97aa3390b774595a@mail.gmail.com> References: <54e0571c0903282201q7706313n32dd2ae2e23074a6@mail.gmail.com> <54e0571c0903282206s7831ed49t97aa3390b774595a@mail.gmail.com> Message-ID: On 29 Mar 2009, at 07:06, Garret Buell wrote: > Would we gain anything by making the switch? Everybody would gain. Content-length is a requirement of the latest Rack spec, presumaby to allow for easier caching, and you have to set it _unless_ you send out chunked - but then you have to state it in the headers. -- Julik Tarkhanov me at julik.nl From judofyr at gmail.com Sun Mar 29 15:24:29 2009 From: judofyr at gmail.com (Magnus Holm) Date: Sun, 29 Mar 2009 21:24:29 +0200 Subject: Rack::Lint::LintError with latest camping and rack In-Reply-To: References: <54e0571c0903282201q7706313n32dd2ae2e23074a6@mail.gmail.com> <54e0571c0903282206s7831ed49t97aa3390b774595a@mail.gmail.com> Message-ID: <391a49da0903291224m17110b8fsea469e9735bbe9c1@mail.gmail.com> Well, this issue is actually solved in the latest master :-) Maybe it's time to release this thing... I'm way to lazy :/ //Magnus Holm On Sun, Mar 29, 2009 at 20:45, Julik Tarkhanov wrote: > > On 29 Mar 2009, at 07:06, Garret Buell wrote: > > Would we gain anything by making the switch? >> > Everybody would gain. Content-length is a requirement of the latest Rack > spec, presumaby to allow for easier caching, and you have to set it _unless_ > you send out chunked - but then you have to state it in the headers. > -- > Julik Tarkhanov > me at julik.nl > > > > > > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: From terragb at gmail.com Sun Mar 29 16:17:27 2009 From: terragb at gmail.com (Garret Buell) Date: Sun, 29 Mar 2009 13:17:27 -0700 Subject: Rack::Lint::LintError with latest camping and rack In-Reply-To: <391a49da0903291224m17110b8fsea469e9735bbe9c1@mail.gmail.com> References: <54e0571c0903282201q7706313n32dd2ae2e23074a6@mail.gmail.com> <54e0571c0903282206s7831ed49t97aa3390b774595a@mail.gmail.com> <391a49da0903291224m17110b8fsea469e9735bbe9c1@mail.gmail.com> Message-ID: <54e0571c0903291317v3b9384e2t86986ccdc36a8e18@mail.gmail.com> What about using the github gem server? http://github.com/blog/51-github-s-rubygem-server That way the most current camping could be installed with a gem install judofyr-camping Instead of having to download and build it (marginally more difficult) -Garret Buell 2009/3/29 Magnus Holm : > Well, this issue is actually solved in the latest master :-) > Maybe it's time to release this thing... I'm way to lazy :/ > > //Magnus Holm > > > On Sun, Mar 29, 2009 at 20:45, Julik Tarkhanov > wrote: >> >> On 29 Mar 2009, at 07:06, Garret Buell wrote: >> >>> Would we gain anything by making the switch? >> >> Everybody would gain. Content-length is a requirement of the latest Rack >> spec, presumaby to allow for easier caching, and you have to set it _unless_ >> you send out chunked - but then you have to state it in the headers. >> -- >> Julik Tarkhanov >> me at julik.nl >> >> >> >> >> >> _______________________________________________ >> Camping-list mailing list >> Camping-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/camping-list > > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list >