Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
ããã«ã¡ã¯ã代表ã®å¹³éã§ãã Ruby on Rails åå¿è åãã«ãMac OS X 10.9.2 Marverick ç°å¢ã§ã®ãAPï¼ã¢ããªã±ã¼ã·ã§ã³ï¼ãµã¼ãã¼ã®æ§ç¯æé ãã¾ã¨ãã¾ããã â»æ¬è¨äºã¯ããã³ããã¼ã¯ãåãç®çã§èª¿ã¹ãå 容ã§ãããããè¨è¿°å 容ã«èª¤ããããã¾ãããããæ°è»½ã«ãææãã ããã INDEX åä½ç°å¢ STEP.1 éå½¢ã¨ãªãRailsã¢ããªã±ã¼ã·ã§ã³ãä½æ STEP.2 å種APãµã¼ãã¼ã®ç°å¢æ§ç¯ 2-1. WEBrick 2-2. Thin 2-3. Puma 2-4. Unicorn 2-5. Rainbows! 2-6. Phusion Passenger STEP.3 åAPãµã¼ãã¼ã®ç¹å¾´ã®æ¯è¼ åä½ç°å¢ Mac OS X 10.9.2 Homebrew 0.9.5 ruby 2.1.1p76 Rails 4.1.0 gem 2.2.2 thin 1.6
Rubyã®ã¦ã§ãã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã«pumaã¨ããã®ãããã¾ãã ã§ããã®pumaã«ã¯ã³ã³ããã¼ã«ãµã¼ãã¨ããä»çµã¿ãããã¾ãããã®ä»çµã¿ã使ãã¨ãæå®ããURLã«HTTPãªã¯ã¨ã¹ããéãã ãã§pumaã®åèµ·åãåæ¢ãè¡ãã¾ãã使ãæ¹ã¯ä¸è¨ã®éãã $ puma -S tmp/puma.state --control unix://tmp/pumactl.sock & # èµ·å $ pumactl -S tmp/puma.state restart # åèµ·å $ pumactl -S tmp/puma.state stop # åæ¢ ã§ãçµè«ããè¨ãã¨ãã¾ãã¿ã¤ãã«éããªã®ã§ãããã³ã³ããã¼ã«ãµã¼ãã使ãã¨ãã¯ãä¸è¨ã ãã§ã¯å°ããã£ããªãããã¼ã¯ã³ï¼--control-tokenãªãã·ã§ã³ï¼ã使ã£ãæ¹ãè¯ãããã¨ãããã¨ã§ããä½æ ããä¸è¨ã®ã±ã¼ã¹ã§å°ãé¢åãªãã¨ã«ãªãã¾ãã $ pu
注:ãã®Tipsã¯Railsåå¿è ãæ¸ãããã®ã§ããããã³ãæè¿ã§ãã #pumaã¨ã¯ http://puma.io/ ã§å ¬éããã¦ããconcurrentãªWebãµã¼ãã¼ãthinãunicornã¯ã¯ã¼ã«ã¼æ¯ã«ããã»ã¹ãç«ã¡ä¸ããããpumaã¯ã¯ã¼ã«ã¼æ¯ã«ã¹ã¬ãããç«ã¡ä¸ãããproductionç°å¢ã§ã¯ãµã¤ãã®ããã©ã¼ãã³ã¹ãä¸ãããããè¤æ°ã®ã¯ã¼ã«ã¼ãç«ã¡ä¸ããããthinãunicornã¯ã¯ã¼ã«ã¼æ¯ã«ããã»ã¹ãç°ãªããããæä»å¦çãã§ããªããããããpumaã¯ã¹ã¬ããã§åä½ãããããMutexã§synchronizeãããã¯ãè¨è¿°ããã°ãæä»å¦çãè¡ããã RailsCast #365 Thread-Safetyã§åãä¸ãããã¦ãããããã§ã¯pumaã®è¨å®çã®ã¡ã¢ãã¾ã¨ããã ##ã¤ã³ã¹ãã¼ã« pumaãä»ã®gemã¨åæ§ãGemfileã«
2.1.1 :001 > require 'active_support' => true 2.1.1 :002 > p 'cat'.pluralize NoMethodError: undefined method `pluralize' for "cats":String from (irb):2 from /Users/kazuhiro.serizawa/.rvm/rubies/ruby-2.1.1/bin/irb:11:in `<main>' ã¨ããããå ¨é¨ãã¼ããããï¼ãã¾ããããããªããï¼ã¨ããæã¯ä»¥ä¸ã®ããã«ãã è¿½è¨ ã³ã¡ã³ãã§ãææãåãã¦requireæã®å 容ãä¿®æ£ãã¾ããããããã¨ããããã¾ããï¼ è¿½è¨ã®è¿½è¨ å ¬å¼çã«ã¯æåã«active_supportãrequireãã¨ããæ¹ããããããã®ã§ä¿®æ£ãã¾ããã
Ruby1.9 ã§æ¼¢åãæ±ãã«ã¯ãmagic comment ã§æåã³ã¼ããæå®ããªãã¨ãããªãã ãã®é¢åãªä½æ¥ãèªåçã«ãã£ã¦ããã Emacs ã®è¨å®ãããã ä¿åæã«èªåã§Ruby 1.9ã®magic commentãã¤ãã - '(rubikitch wanna be (a . lisper)) 1 ã¶æä»¥ä¸ ä½ä¸èªç±ãªã使ã£ã¦ãããã ãã©ãæåã³ã¼ã以å¤ã® magic comment ã使ããªããã¨ã«æ°ãã¤ããã ä½ãè¨å®ãã¦ãã¦ãæ¶ããã¦ãã¾ãã æ¡å¼µåãä»ããã«ã¹ã¯ãªãããæ¸ã㦠chmod ãã¦ä½¿ããã¨ãå¤ãã®ã§ãæ®æ®µãã -*- ruby -*- ã¨ãæ¸ãã¦ãããå°ã£ãã Emacs ã® info ãæãèªã¿ãã¦ããããã試ãã¦ã¿ãçµæã以ä¸ã®ãã¨ãåãã£ãã ååã ããæ¸ã㨠major mode ã®è¨å®ã«ãªãã # -*- ruby -*- æ示çã« major m
ãIoTï¼ã¢ãã®ã¤ã³ã¿ã¼ãããï¼ãã¨ããã¨ãçã£å ã«æãæµ®ãã¶ã®ã製é æ¥ã ãæ©å¨ãè¨åã«åãä»ããã»ã³ãµã¼ãããããçµç±ã§ç¨¼åãã¼ã¿ãåéããéç¨ã»ä¿å®ã«çãããå ¸åä¾ã¯ç±³ã¼ãã©ã«ã»ã¨ã¬ã¯ããªãã¯ï¼GEï¼ã®ãã¤ã³ãã¹ããªã¢ã«ã»ã¤ã³ã¿ã¼ããããæ§æ³ãã³ããã®ãã³ã ãã©ãã¯ã¹ãã ããã ä¾ãã°ãGEãæ±ãã®ã¯ã¬ã¹ã¿ã¼ãã³ãã¸ã§ããã¨ã³ã¸ã³ã¨ãã£ãç£æ¥æ©å¨ãä¸å¿ã ãç£æ¥æ©å¨ã¯é«ä¾¡ã§ãç¶æ管çã«å¤é¡ã®ã³ã¹ãããããããã®ãããã1ï¼ ãã§ã稼åå¹çãé«ããããã°ãè«å¤§ãªã¡ãªãããå¾ããããGEã¯ã¬ã¹ç«åçºé»ãã©ã³ãã®å¹çã1ï¼ æ¹åã§ããã°ã15å¹´éã§660åãã«ã®çæè²»åæ¸ã«ã¤ãªããã¨è©¦ç®ãã¦ããã 確ãã«ã¬ã¹ã¿ã¼ãã³ãã¸ã§ããã¨ã³ã¸ã³ã®ããã«é«ä¾¡ã§ãç¶æ管çã«å¤é¡ã®ã³ã¹ãããããç£æ¥æ©å¨åéã§ãIoTã·ã¹ãã ã®å°å ¥ãå è¡ãã¦ãããã¨ã¯ç¢ºãã ãããã¨ã¯ãããå°å£²ãããµã¼ãã¹æ¥çã§å°å ¥ä¾ãå ¨ããªããã¨
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}