Hi!<div><br></div><div>Camping has switched to Rack (<a href="http://rack.rubyforge.org">http://rack.rubyforge.org</a>) recently.</div><div><br></div><div>This should work:</div><div><br></div><div><div>if __FILE__ == $0</div>
<div> Conf::Models::Base.establish_connection :adapter => 'sqlite3', :database => 'conf.db'</div><div> Conf::Models::Base.logger = Logger.new('conf.log')</div><div> Conf.create</div><div><br>
</div><div> app = Rack::Builder.new do</div><div> use Rack::ContentLength</div><div> run Conf</div><div> end</div><div><br></div><div> trap('INT') { exit }</div><div><br></div><div> puts "** <a href="http://localhost:80/">http://localhost:80/</a>"</div>
<div> t = Time.now</div><div> @servertime=t</div><div> puts "서버 시작 시간 : #{t.year}년#{t.month}월#{t.day}일#{t.hour}시#{t.min}분#{t.sec}초"</div><div> Rack::Handler::Mongrel.run(app, :Port => 80) </div><div>end</div>
<div><br></div><div>There are probably more changes you need to do with your code. Just post here if you're stuck and we'll figure out :-)</div><div><br></div><div>If don't want to upgrade, you can keep using the old version of Camping by placing this at the top of the file:</div>
<div><br></div><div>require 'rubygems'</div><div>gem "camping", "=<span class="Apple-style-span" style="border-collapse: collapse; ">1.5.180"</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">require 'camping'</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">Good luck, and have fun with Camping!</span></div>
<br>//Magnus Holm<br>
<br><br><div class="gmail_quote">2009/3/22 in-seok hwang <span dir="ltr"><<a href="mailto:his2000x@gmail.com">his2000x@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
hi all <br><br>i'm can't speak english well....<br><br>i has something problem.<br><br>i used gems list is..<br>mongrel-1.1.5 <br>camping-1.5.180<br><br>and update now..<br><br>camping-1.9.300<br><br>so, My blog looks like an error on the server.<br>
<br>my old code is ..<br><br>615 if __FILE__ == $0<br>616 require 'mongrel/camping'<br>617<br>618 Conf::Models::Base.establish_connection :adapter => 'sqlite3', :database => 'conf.db'<br>
619 Conf::Models::Base.logger = Logger.new('conf.log')<br>620 Conf.create<br>621<br>622 config = Mongrel::Configurator.new :host => "0.0.0.0" do<br>623 listener :port => 80 do<br>
624 uri "/", :handler => Mongrel::Camping::CampingHandler.new(Conf)<br>625 uri "/favicon", :handler => Mongrel::Error404Handler.new("")<br>626 trap("INT") { stop }<br>
627 run<br>628 end<br>629 end<br>630<br>631 puts "** <a href="http://localhost:80/" target="_blank">http://localhost:80/</a>"<br>632 t = Time.now<br>633 @servertime=t<br>634 puts "서버 시작 시간 : #{t.year}년#{t.month}월#{t.day}일#{t.hour}시#{t.min}분#{t.sec}초"<br>
635 config.join<br>636 end<br><br>and error code is,<br><br><br>his@info105:~$ sudo ruby conf_mongrel1.9.rb<br>** <a href="http://localhost:80/" target="_blank">http://localhost:80/</a><br>서버 시작 시간 : 2009년3월22일13시30분25초<br>
Sun Mar 22 13:30:31 +0900 2009: Read error: #<TypeError: #<StringIO:0xb72b8c18> is not a symbol><br>
(eval):53:in `const_get'<br>(eval):53:in `method_missing'<br>/usr/local/lib/site_ruby/1.8/mongrel/camping.rb:53:in `process'<br>/usr/local/lib/site_ruby/1.8/mongrel/camping.rb:52:in `synchronize'<br>/usr/local/lib/site_ruby/1.8/mongrel/camping.rb:52:in `process'<br>
/usr/local/lib/site_ruby/1.8/mongrel.rb:159:in `process_client'<br>/usr/local/lib/site_ruby/1.8/mongrel.rb:158:in `each'<br>/usr/local/lib/site_ruby/1.8/mongrel.rb:158:in `process_client'<br>/usr/local/lib/site_ruby/1.8/mongrel.rb:285:in `run'<br>
/usr/local/lib/site_ruby/1.8/mongrel.rb:285:in `initialize'<br>/usr/local/lib/site_ruby/1.8/mongrel.rb:285:in `new'<br>/usr/local/lib/site_ruby/1.8/mongrel.rb:285:in `run'<br>/usr/local/lib/site_ruby/1.8/mongrel.rb:268:in `initialize'<br>
/usr/local/lib/site_ruby/1.8/mongrel.rb:268:in `new'<br>/usr/local/lib/site_ruby/1.8/mongrel.rb:268:in `run'<br>/usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:282:in `run'<br>/usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:281:in `each'<br>
/usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:281:in `run'<br>conf_mongrel1.9.rb:627:in `cloaker_'<br>/usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:149:in `call'<br>/usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:149:in `listener'<br>
conf_mongrel1.9.rb:623:in `cloaker_'<br>/usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:50:in `call'<br>/usr/local/lib/site_ruby/1.8/mongrel/configurator.rb:50:in `initialize'<br>conf_mongrel1.9.rb:622:in `new'<br>
conf_mongrel1.9.rb:622<br><br><br>plz help..<br><br><br>
<br>_______________________________________________<br>
Camping-list mailing list<br>
<a href="mailto:Camping-list@rubyforge.org">Camping-list@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/camping-list" target="_blank">http://rubyforge.org/mailman/listinfo/camping-list</a><br></blockquote></div><br></div>