Sinatra
Sinatraã0.9.2ã«updateããã¨ã以ä¸ã®ã¨ã©ã¼ã«ãªã£ã¦çµã¿è¾¼ã¿ã®WEBrickã§åããªããªã£ã¦ãã¾ã£ãã /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.2/lib/sinatra/base.rb:930:in `detect_rack_handler': Server handler (thin,mongrel,webrick) not found. (Runâ¦
Sinatraã®FAQã«Basicèªè¨¼ãè¡ããµã³ãã«ããã£ãã®ã§è©¦ãã¦ã¿ã¾ããã¨ãã£ã¦ãããset Rack::Auth::Basicããå¼ã³åºãã ãã require 'rubygems' require 'sinatra' # èªè¨¼ãè¨å®ã # ã¦ã¼ã¶ã¼åããfooã,ãvarãã®å ´åã®ã¿ã¢ã¯ã»ã¹ã許å¯ããã use Rack::â¦
Sinatraã§Sessionã使ãç°¡åãªãµã³ãã«ã§ããæé ã¯ä»¥ä¸ã ãset :sessions, trueãã§ã»ãã·ã§ã³ãæå¹åã(ãã®ã¸ãã«èª¬æãããã¾ãã) å¾ã¯ããsession[]ãã§ã»ãã·ã§ã³ã®å¤ã«ã¢ã¯ã»ã¹å¯è½ã§ãã ã¡ãªã¿ã«ãsessionã¯Sinatra::Helpersã¢ã¸ã¥ã¼ã«ã§å®ç¾©ãâ¦
Sinatraã¯ãRubyã§ç°¡åã«WebApplicationãä½æã§ããDSL(ãã¡ã¤ã³ç¹åè¨èª)ã§ãã ã¤ã³ã¹ãã¼ã« $ gem install sinatra ã·ã³ãã«ãªãµã³ã㫠以ä¸ã¯ã"/"ã«GETã§ã¢ã¯ã»ã¹ãããå ´åã"Hello World"ãè¿ãWebãµã¼ãã¼ãèµ·åããã ãã®åç´ãªãµã³ãã«ã§ãã reqâ¦