You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
⺠2023 (1) ⺠12æ (1) ⺠2022 (1) ⺠12æ (1) ⺠2021 (1) ⺠12æ (1) ⺠2020 (1) ⺠12æ (1) ⺠2019 (1) ⺠12æ (1) ⺠2018 (5) ⺠12æ (1) ⺠5æ (1) ⺠3æ (1) ⺠1æ (2) ⺠2017 (8) ⺠12æ (1) ⺠11æ (1) ⺠10æ (1) ⺠5æ (1) ⺠4æ (1) ⺠2æ (1) ⺠1æ (2) ⺠2016 (16) ⺠12æ (3) ⺠11æ (1) ⺠10æ (1) ⺠9æ (1) ⺠8æ (1) ⺠7æ (1) ⺠6æ (2) ⺠4æ (3) ⺠3æ (1) ⺠2æ (1) ⺠1æ (1) ⺠2015 (20) ⺠12æ (3) ⺠11æ (2) ⺠10æ (1) ⺠9æ (1) ⺠8æ
â [ruby] Re: Sinatra 1.1 åºã (æ¡å¼µã©ã¤ãã©ãªã«ã¤ãã¦) RDBMSã使ããã¨ããã¨çµ¶å¯¾ã«æ¡å¼µã©ã¤ãã©ãªãå¿ è¦ã«ãªããããã ããã¤ããªããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãã¦ãããã°ããã®ã ããæé ãä¸ã¤å¢ããã®ã§ãèªç¤¾ã§ä½¿ãåã«ã¯å ¨ç¶åé¡ãªãã®ã ããã客ããã®ã¨ããã«ã¤ã³ã¹ãã¼ã«ãã¦ãããã¨ãã«ã¯ãã®æé ããªãããã [Sinatra 1.1 åºã - å°æãã¤ã¤å転ããå¼ç¨] ã·ãã¥ã¨ã¼ã·ã§ã³ãããåãããªããã©ãæ¡å¼µã©ã¤ãã©ãªãªãã§Sinatraã¢ããªãæ¸ãæ¹æ³ãèãã¦ã¿ãã Rubyæ¬ä½ : Rubyã¯ã¤ã³ã¹ãã¼ã«ã§ãããããã®ã§ãã¹ã Sinatraæ¬ä½ : Pure Rubyãªã®ã§OKã ãã¼ã¿ãã¼ã¹ RDBMSã使ã SQLite : ruby-sqlite3ãæ¡å¼µã©ã¤ãã©ãªã ããã¨ãã話ãªããPure Rubyã®SQLiteã©ããã¼ã誰ãä½ã£ã¦ããããªæ°ããã
Sinatra 1.1.0 ããªãªã¼ã¹ããã¾ããã sinatra/CHANGES at 1.1.0 · sinatra/sinatra · GitHub æå ã®ã³ã¼ããSinatra 1.1対å¿ãããã¨æã£ã¦CHANGESãçºãã¦ãç°¡åã«ç¿»è¨³ãã¦ã¿ããããªã¨æã£ããã®ã§ã ãã ããããããã訳ãªã®ã§ããã¾ãæ¬æ°ã§ä¿¡ããªãã§ãã¿ããªã¡ããã¨è±èªã®åæã«å½ããã¨ããã¨æãã¾ãã ã㨠1.0 ãç解ã®åæã«ãªã£ã¦ãã®ã¯è¨ãã¾ã§ãããã¾ããã before/after ãã£ã«ã¿ã«ããã¹ã®ãã¿ã¼ã³ããã(ãã©ã¡ã¼ã¿ãã£ããã£ã¤ã)ã使ããããã«ãªã£ã before('/user/:name') { |name| ... } scssãã³ãã¬ã¼ããã¬ã³ããªã³ã°ããããã« scss ã¨ããã¡ã½ããããã³ãã¡ã¤ã«æ¡å¼µå .scss ã使ããããã«ãªã£ã 以ä¸ã®ãã³ãã¬ã¼ã(ç¨ã®ã¡ã½ãã)ã使ããããã«ãª
æè¿ã¯ä»äºã§Sinatraã¢ããªãæ¸ããããã¦ããã®ã§ãSinatraã¢ããªãåããããã«ã¯ã©ã®HTTPãµã¼ãã使ãã®ããã¹ããªã®ããæ°ã«ãªã£ã¦ãããï¼å ã«çµè«ãæ¸ãã¦ããããã©ãã©ãããã¹ããã¨ããå¯ä¸ã®é¸æè¢ã¯ä»ã®ã¨ããããã¾ãããé©æé©æã§ããï¼ Sinatraã¯Rackã®ä¸ã«æ§ç¯ããã¦ããã®ã§ãRackã«å¯¾å¿ããHTTPãµã¼ãã¼ã使ã£ã¦åããäºã«ãªãã®ã ãããã®æ°ããããã¨å¤ããã©ãã使ãã°ããã®ãè¿·ãã代表çãªãã®ãæããã ãã§ããWebRick, Mongrel, Thin, Unicorn, Passenger(Apacheã¨ãã«çµã¿è¾¼ãã§ä½¿ããã¤), FastCGI, (æ®éã®)CGIããããããã¯é¸æè¢ãããï¼ããã¤ãHTTPãµã¼ããããªãç©ãæ··ãã£ã¦ããããRackã対å¿ãã¦ãã¨ããç¹ã¯å ±éãã¦ããï¼ã WebRickã¯ããããããã©ã¼ãã³ã¹ã«éç¹ãç½®ãã¦ããªãããMo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
tkosugaã管çãã¦ãã¾ãããåãåããããã¾ãããã¡ã¼ã«ã«ã¦ãé£çµ¡ä¸ãããä»æµè¡ã®rubyã®è»½éã¦ã§ããã¬ã¼ã ã¯ã¼ã¯sinatraã使ã£ã¦ãµã¤ãä½ãã¾ããããã¼ã¸ã§ã³ã¯0.9.2ã§ããsinatraã®ãµã¤ãã¯ã«ãã³ãããªãã ã¾ãgemã§ã¤ã³ã¹ãã¼ã«ã gem install sinatra ããã¸ã§ã¯ããã©ã«ãç´ä¸ã®ã³ã³ããã¼ã©ã¼ã¨ãªãapp.rbã®å 容ãä»åä½ã£ããµã¤ãã®ã³ã¼ãã§ãã require "rubygems" require "sinatra" helpers do def partial(page, locals = {}, options={}) erb page.to_sym, options.merge!(:layout => false), locals end end get '/' do erb :index end get '/about' do er
Sinatraã¯ãRubyã§ç°¡åã«WebApplicationãä½æã§ããDSL(ãã¡ã¤ã³ç¹åè¨èª)ã§ãã ã¤ã³ã¹ãã¼ã« $ gem install sinatra ã·ã³ãã«ãªãµã³ã㫠以ä¸ã¯ã"/"ã«GETã§ã¢ã¯ã»ã¹ãããå ´åã"Hello World"ãè¿ãWebãµã¼ãã¼ãèµ·åããã ãã®åç´ãªãµã³ãã«ã§ãã require 'rubygems' require 'sinatra' # "/"ã«GETã§ã¢ã¯ã»ã¹ãããå ´åã"Hello World"ãè¿ãã get( "/" ) { 'Hello world!' } èµ·åãã¦ã以ä¸ã®URLã«ã¢ã¯ã»ã¹ããã° http://127.0.0.1:4567/ãHello world!ããè¿ããã¦ããã¯ãããã°ãã¿ãéãã§ã¯ãå é¨çã«ã¯Webrickãå©ç¨ãã¦ããã¿ãããã¾ããããã©ã«ãã§ã¯ãDaemonã«ã¯ãªããªãããã§ãã portãæå®ãã
GT Nitro: Car Game Drag Raceã¯ãå ¸åçãªã«ã¼ã²ã¼ã ã§ã¯ããã¾ãããããã¯ã¹ãã¼ãããã¯ã¼ãã¹ãã«å ¨éã®ã«ã¼ã¬ã¼ã¹ã²ã¼ã ã§ãããã¬ã¼ãã¯å¿ãã¦ãããã¯ãã©ãã°ã¬ã¼ã¹ããã¤ãã¼ï¼å¤å ¸çãªã¯ã©ã·ãã¯ããæªæ¥çãªãã¼ã¹ãã¾ã§ãæãã¯ã¼ã«ã§éãè»ã¨ã«ã¼ã¬ã¼ã¹ã§ãã¾ããã¹ãã£ãã¯ã·ããããã¹ã¿ã¼ããããããè³¢ã使ã£ã¦ç«¶äºãæã¡ç ´ãå¿ è¦ãããã¾ãããã®ã«ã¼ã¬ã¼ã¹ã²ã¼ã ã¯ãã®ãªã¢ã«ãªç©çå¦ã¨ç´ æ´ãããã°ã©ãã£ãã¯ã¹ã§ããªãã®å¿ãççºããã¾ããããã¾ã§ãã¬ã¤ãããã¨ã®ãªããããªãã®ã§ãã GT Nitroã¯ããªãã¬ãã¯ã¹ã¨ã¿ã¤ãã³ã°ã試ãã«ã¼ã¬ã¼ã¹ã²ã¼ã ã§ããæ£ããç¬éã«ã®ã¢ãã·ããããã¬ã¹ãæãåãè¸ãå¿ è¦ãããã¾ããã¾ãã大ç©ãã¡ã¨ç«¶ãã¤ã¤ãè»ã®ãã¥ã¼ãã³ã°ã¨ã¢ããã°ã¬ã¼ããè¡ããªããã°ãªãã¾ãããä¸çä¸ã§æé«ã®ãã©ã¤ãã¼ã¨è»ã¨ã«ã¼ã¬ã¼ã¹ã«æããã¨ã«ãªãããã©ãã°ã¬ã¼ã¹ã®çå
longkey1.net 2024 èä½æ¨©. ä¸è¨±è¤è£½ ãã©ã¤ãã·ã¼ããªã·ã¼
ãã«ã¹ã¿ãã¯ãã¦ãªã®Railsãããã¾ã§å¿ è¦ãªãããã¨ãERBã§ã´ãªã´ãªãã¡ã³ãã¯ã»ã¼ããã£ã±ãRailsã§ããªã©ã¨ãé½ã¯ã¾ãã®ã¼ããããããã¦ã¼ãããRubyã®Webãã¬ã¼ã ã¯ã¼ã¯ã¯ä»ã«ããããã©ãã軽ãã¦ãããã ãPHPã使ããããªãã ããªãã ã ãããªæ©ã¾ããã解æ¶ãã¦ããããã¬ã¼ã ã¯ã¼ã¯ãçºè¦ãã¦ãã¾ãã¾ããããSinatraãã§ãããã¾ããããã¤ã¯ã軽ããã ã Sinatra ãµã¤ãã®ããããã¼ã¸ã«æ¸ããã¦ããã³ã¼ãããããããµã¯ãµã¯æããããåºãã¦ããã¦ãã¾ãã require 'rubygems' require 'sinatra' get '/hi' do "Hello World!" end 説æèªã¾ãªãã¦ã解ãããããã æ¥æ¬èªã®è§£èª¬ã¹ã©ã¤ããããã¾ãããã解ã解説ã¼ã å ¬å¼ãµã¤ãã®READMEãèªãã°ãã ãããOKã Sinatra: README ãã©ã¡ã¼ã¿ãåå¾ã
ã¡ãã¼ãæ軽ã«è©¦ãã¡ãã Web ã¢ããªã±ã¼ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯ã§ããã¨ããã® Sinatra ã§éãã§ã¿ã¾ããï¼ Sinatra is a DSL for quickly creating web-applications in Ruby with minimal effort Sinatra: README âminimal effortâ ã¨è¬³ã£ã¦ããã®ã¯ä¼éãããªãã¦ï¼Web ãµã¤ãã«æ¸ããã¦ããéãã«é²ãã¦ããã°ï¼ããã«åããã®ãã§ãã¡ããã¾ãï¼ãã£ãããªè¡æä½é¨ã§ããï¼æåã« Sinatra ãç¥ã£ãã®ã¯usericonsãªãã¥ã¼ã¢ã«ã¨ã½ã¼ã¹å ¬é â SWDYHãèªãã ã¨ãã§ï¼ã§ããã®ã¨ãã¯ã½ã¼ã¹ã³ã¼ããè¦ã¦ãã©ã®é¨åã Sinatra ã®å¦çã«å½ãããããåããã¾ããã§ããï¼æè¿ã«ãªã£ã¦ï¼æ¹ãã¦è§¦ã£ã¦ã¿ããã¨æã£ãã¨ãã«Ruby Sapporo Night vol.10 ã«ã¦
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}