Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
tDiary 5.3.0 ããªãªã¼ã¹ãã¾ãã1å¹´4ã¶æã¶ãã®ãªãªã¼ã¹ã§ããæ¬ä½ã«å¤§ããªå¤æ´ã»ä¿®æ£ã¯ããã¾ããããé¢é£ããéè¦ã©ã¤ãã©ãªã®ã¢ãããã¼ããå«ã¾ãã¦ãã¾ãã tDiary-5.2.4 ãªãªã¼ã¹ tDiary 5.2.4 ããªãªã¼ã¹ãã¾ããæ¬ä½ã«å¤§ããªå¤æ´ã»ä¿®æ£ã¯ããã¾ããããé¢é£ããéè¦ã©ã¤ãã©ãªã®ã¢ãããã¼ããå«ã¾ãã¦ãã¾ããç¾å¨ãè¤æ°ã®åé¡ãææããã¦ããã®ã§ãç°å¢ã«ãã£ã¦ã¯åä½ããªãå¯è½æ§ããããä»å¾ã®ãªãªã¼ã¹ã§ä¿®æ£ãã¦ããäºå®ã«ãªã£ã¦ãã¾ããåä½ããªãå ´åã¯ãããããã 5.2.2ãªãã5.2.3ãå©ç¨ãã¦ãã ããã tDiary-5.2.3 ãªãªã¼ã¹
Not your computer? Use a private browsing window to sign in. Learn more about using Guest mode
ã¿ã¤ãã«ã¯é£ãã§ããRuby ã«ç²ç®çã«æãã¦ããè¿çã«ã¯ Ruby ã®ççï¼ãã°ãï¼ã¯ã¨ã¯ãã§ãã ããã¯ã¨ãããã ã¡ã½ããåã®å¥åããããã ãããªã㯠map æ´¾ï¼ãããã¨ã collect æ´¾ï¼ãã£ã¦ããåããã¾ãå«ãã ããï¼å¥åã«ãæ義ãããã¨ã¯æããã ãã©ï¼è¨æ¶ã®è² æ ã大ããã èªåã§ã¯ map ãã使ããªãã¦ãï¼ä»äººã®ã³ã¼ãèªããã ã£ãã collect ãç¥ã£ã¦ããªãã¡ããªããªãã ãã°ããåã« reduce ã£ã¦ããã¡ã½ããè¦ã¦ï¼ãããªã®ãã£ãã£ãï¼ã¨æã£ãã inject ã®å¥åã ã£ãã map/collect 㨠inject/reduce ã®ååã¨ãã®èæ¯ã«ããçºæ³ã«ã¤ãã¦ã¯ï¼Rubyist Magazine ã«è¯ãè¨äºãããï¼ ãããã¨æãã°ï¼Array#delete_if 㨠Array#reject! ã¿ããã«ï¼åãã¯åºæ¬çã«åãã ãã©ï¼åé¤ãè¡ãããªãã£
å 容 ä¼è¤æ·³ä¸ããã®ããã°ã©ãã³ã°åå¿è æè¿ï¼ãã¨ã©ã¼ãåºã¾ãããã©ãããã°ããã§ããï¼ãããåæ¥ããããã®åºæ¬ã¨æ¥µæ ã¨ããåç»ã®å 容ãèªåãªãã«ã¾ã¨ãããã®ã§ãã ã¨ã¦ãåãããããã¾ã¨ã¾ã£ã¦ãããç¹ã«åå¿è ã«ã¨ã£ã¦ã¯æçãªæ å ±ã ã¨æã£ãã®ã§æåã«èµ·ããã¦ã¿ã¾ããã ã¨ã©ã¼ã§ãã§ãã¯ããé ç® ã¨ã©ã¼ã¡ãã»ã¼ã¸ Comment(#XXXXXX) expected, got String (#XXXXXX)ãã®ãããªãã®ã è±èªãããããªããªã翻訳ãã¦ã§ãã¾ãã¯ä½ããããªãã®ãã¨ã©ã¼ã¡ãã»ã¼ã¸ãè¦ããã¨ã§ã¡ããã¨ç¢ºèªããã ã¨ã©ã¼ã®ã¿ã¤ãç¢ºèª ActiveRecord::AssociationTypeMismatchãã®ãããªãã®ã ãããã§èª¿ã¹ãã¨ãã©ããã£ãå ´åã«ãããã¨ã©ã¼ãªã®ãããããã ã¦ã¼ã¶ã¼ãæä½ããæé ãµã¼ãã¼ã®ãã°ã確èªãã¦ãã©ã®ãããªæä½ãç»é¢é·ç§»ã«ãã£ã¦ã¨ã©ã¼ãçºç
éçºä½æ¥ã«ãããã¯ãã¼ã«ã¯å¿ é ããã°ã©ã ã®åå¼·ãç²ãæ§ã§ããçªç¶ã§ãããRailsã®åå¼·ã®éã«ãããã°ãã¼ã«ä½¿ã£ã¦ãã¾ããï¼ ãããã°ãã¼ã«ã£ã¦ä½ï¼ã¨ããæ¹ãããããããã¾ããããããã°ã©ãã³ã°ã«ã¤ããã®ã®ãããã°ä½æ¥ããµãã¼ããã¦ããããã¼ã«ã®ãã¨ã§ãã¹ãããå®è¡ã¨ãã£ã¦ä¸è¡ãã¨ã«ããã°ã©ã ãå®è¡ãã¦ãã®æã«å®£è¨ããã¦ãããå¤æ°ã®ä¸èº«ãè¦ãªããåä½ã確èªãããã¨ãã§ãã¾ãã éçºä½æ¥ããã¦ããã¨ãããããï¼ï¼ï¼ï¼ï¼ãªãã§ãã®å¤æ°nullãªã®ï¼ï¼ï¼ããªãã¦ãã¨ãå¤ããã¨æãã¾ããããããªã¨ãã«ãããã°ãã¼ã«ãå°å ¥ãã¦ã¿ãã¨ãããã°ä½æ¥ãæãã¾ãã ããªã³ããããã°ã¨ãããRubyã§ããã½ã¼ã¹ã³ã¼ãã«putsãprintãªã©ãåãè¾¼ãã§ãå®è¡ãã¦ã¿ãã¨ããæ¹æ³ãããã¾ããã ããããããã§ãä»åã¯Railsã®éçºæã«ç§ãã¡ã使ã£ã¦ããbyebugï¼ãã¤ãã°ï¼ãç´¹ä»ãã¾ãã byebug(ã
Perl ã§ã® print debug ã®æ¹æ³ã®ç´¹ä»ããã¼ã (?)ã ã£ãã®ã§ãèªåãããè¡ã£ã¦ã Ruby ã§ã® debug æ¹æ³7ã¤ã«ã¤ãã¦æ¸ãã¦ã¿ã¾ãã p ãåãã®äººãå¤ã Kernel#p ã¡ã½ãããããã使ãã¨ãªãã¸ã§ã¯ãã®å 容ãè¦ãããå½¢ã§åºåãã¦ããã¾ãã >> p ({:foobar => :baz}) {:foobar=>:baz}Object#inspect ã使ãã¨ãp ã§åºåããã¨ãã¨åãæååã String ã¨ãã¦åå¾ã§ãã¾ãã >> puts ({:foobar => :baz}).inspect {:foobar=>:baz}åå¿è ã®é ãã® p ã§ã®åºåã使ãæ¹æ³ãããããªãã¦å°ã£ãè¨æ¶ãâ¦ã pp pp ã¨ããã©ã¤ãã©ãªã使ãã¨ãp ãããããè¦ãããå½¢å¼ã§åºåãã¦ããã¾ãããã¨ãã° >> a = Array.new(10) { {:foobar => :
ããã«ã¡ã¯ï¼Webã³ã¼ãã¼ã»ããã°ã©ãã¼ã®è²åï¼@touhicomuï¼ã§ãã ä»æ¥ã¯Rubyã§ãããã°ãè¡ãæ¹æ³ã«ã¤ãã¦è§£èª¬ãããã¨æãã¾ãã ãã®è¨äºã§ã¯ã putsãpãppã使ã£ããããã°æ¹æ³ loggerã使ã£ããããã°æ¹æ³ ã¨ããåºæ¬çãªå 容ããã Rubyã®pry-debugã§ãããã°å®è¡ããæ¹æ³ Ruby On Rails ã§ãããã°ããæ¹æ³ RubyãIDEã§ãããã°ããæ¹æ³ ãªã©ã®å¿ç¨çãªä½¿ãæ¹ã«é¢ãã¦ãå¦ç¿ãã¦ããã¾ãã ãã®ãã¼ã¸ã§ãRubyã®ãããã°ãloggerãpryãRailsã®ä½¿ãæ¹ãããææ¡ãã¦èªåã®ã¹ãã«ã¨ãã¦ããã¾ãããï¼ Rubyã®åºæ¬çãªãããã°æ¹æ³ putsãpãppã使ã£ããããã°æ¹æ³ Rubyã§ãããã°ãè¡ãéãåºæ¬çãªææ³ã¨ãã¦ç¨ããã¡ã½ããã«putsãpãppãªã©ãããã¾ãã ã¾ããputsãè¦ã¦ãã¾ãããã putsã¯å¼æ°ã®æååãç»é¢
ironsand@osx gem environment RubyGems Environment: - RUBYGEMS VERSION: 2.0.3 - RUBY VERSION: 2.0.0 (2013-06-27 patchlevel 247) [x86_64-darwin11.4.2] - INSTALLATION DIRECTORY: /Users/ironsand/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0 - RUBY EXECUTABLE: /Users/ironsand/.rbenv/versions/2.0.0-p247/bin/ruby - EXECUTABLE DIRECTORY: /Users/ironsand/.rbenv/versions/2.0.0-p247/bin - RUBYGEMS PLATFORMS
Fetching mysql2 0.5.2 Installing mysql2 0.5.2 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /Users/name/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/mysql2-0.5.2/ext/mysql2 /Users/name/.rbenv/versions/2.5.3/bin/ruby -r ./siteconf20181128-2670-lgcxlu.rb extconf.rb checking for rb_absint_size()... yes checking for rb_absint_singlebit_p
ããã£ãããã ãã æ¨æ¥å¸°ãã«ã¡ãã£ã¨Rubyã£ã¦åãã¦ãã人ã«ã¯ãã¨ãã¨ãããã¦ãªãããããªããã£ã¦èãã¦ãã¾ã£ãã®ã§æ¸ãã¾ããåãèãã¦ãã¾ã£ããã¨ãªã®ã§ã詳ãã人ã¯åè«ããããã¨ããããã§ãã Rubyã£ã¦æ¤ç´¢ãã¦ã§ãè¨äºã®99ï¼ ãç¾å½¹ã¨ã³ã¸ãã¢åãã®èª¬æã°ã£ãã ãããããã¾ãã£ã¦ããã¨ãRubyã®ç¹å¾´ã«ã¤ãã¦æ¸ããã¦ããããã¹ãã«ããããã§ããã¾ãããããã£ãã¨ããã§è¨ãããRubyã®è©±ã¯å¤§ä½ãããªã¨ãããã¨æãã¾ãã ããããã§ããã©ãGoogleã§æ¤ç´¢ãã¦ã§ã¦ããè¨äºã®å¤§ä½ãã 1. ããæè¿rubyã使ãå§ããã¨ã³ã¸ã㢠(ä¾ãã°æ°å ¥ç¤¾å¡) 2. æ®æ®µrubyã¯ä½¿ã£ã¦ããªããã®ã®rubyã«èå³ãããã¨ã³ã¸ã㢠ã¿ãããªäººã対象ã«ãã¦ãããã§ãããè¨èªã«è¿·ã人ã対象ã«ããªãRubyã®ããã¨ããã¨ãã£ã¦ãã¾ããªããã§ãã ãã¨ã³ã¼ããç¾ãããããã¨ããã¾ããRubyã§æ¸ãããã¯
ããã«ã¡ã¯ãæ ªå¼ä¼ç¤¾ãã¼ã·ãã¯ã®CTOãã£ã¦ã@zaruã§ããä»å¹´ã¯ããã¦Qiitaã®ã¢ããã³ãã«ã¬ã³ãã¼ã«åå ãã¾ããã25æ¥åã¾ããããªãã¨ãé å¼µãã¾ããã¾ãããã¼ã·ãã¯ã®ã¨ã³ã¸ãã¢ã«ã¤ãã¦èå³ã®ãã人ã¯ãã¼ã·ãã¯ã¨ã³ã¸ãã¢ã®Qiitaè¨äºã«ç®ãéãã¦ã¿ã¦ãã ããããããªãã«é¢ç½ãè¨äºãããã¨æãã¾ãã é·ãåç½®ã Chefããã£ã¡ãæµè¡ã£ã¦ä»ãå®çªãã¼ã«ã«ãªã£ã¦ã¾ãããåã¯Chefã«ææ¦ãããã®ã®è±è½ãããã¡ã¨ã³ã¸ãã¢ã§ãããªãã§è±è½ãããã¨ããã¨ãã»ã³ã»ã³ä½ã£ãã¬ã·ããä¿å®ã§ããªãã£ããã§ãããChefãããã人ã社å ã«å ¨ç¶ããªãï¼æãããã«ãèªåãããåãã£ã¦ããªãã¨ããããã¼ã«ã«æ¯ãåããã¦ãã¡ãã¡ã¨ããç¶æ³ã«ãªã£ã¦ãã¾ãã¾ããã ããã§ãããã£ããVagrantBoxãç´æ¥é å¸ããããAWSãªãAMIåããããã®ã使ãã¾ãããããã¦ãããã§ããããã¾ã§å¤§è¦æ¨¡ãªã¤ã³ãã©ã§ããªã
Help us understand the problem. What is going on with this article? Rails3.2ããRails4.2ã«ä¸ãããActiveRecordãé ããªã£ãã®ã§ãã©ããã£ã¦èª¿æ»ãã¦ãã©ã®ããã«å¯¾å¦ããããèªã£ã¦ã¿ããã ã¨ã¦ãé·ãã®ã§ããã«ã人ã¯æåã¨æå¾ã ãèªãã°ããã§ãã TL;DR ç°å¢: Ruby 2.1.5 ARãªãã¸ã§ã¯ãã大éã«(ãã£ãã750kããã)loadãããããå¦ç 3.2ç³»ã§ã®å®è¡æéã¯ç´480secã 4.2ç³»ã§ã¯ç´2900sec ç´6åã®æ§è½å£å åå : preloadã§æ§è½å£åãã¦ã CollectionProxyã®çæå¨ãã§é ããªã£ã¦ã Rails4ããARãªãã¸ã§ã¯ãã®1attributeæ¯ã«Objectçæããã®ã§é ã GCã®æéãå¢ãã 調æ»æ¹æ³: Githubã®commitãIssueã
å æãheroku ã®æ¨ããµã¼ãã unicorn ãã puma ã«å¤ãã£ãã¨ããçºè¡¨ãããã¾ãããunicorn ã ã¨ã¹ãã¼ã¯ã©ã¤ã¢ã³ãã®å½±é¿ãåããããã¨ããã®ãçç±ãªããã§ãã ããå°ã詳ãã調ã¹ã¦ã¿ã¾ãããã ããããã¹ãã¼ã¯ã©ã¤ã¢ã³ãã£ã¦ãªã« ãã®åã®éãé ãåç·ã®ã¯ã©ã¤ã¢ã³ãã§ãã3Gç°å¢ã®ã¢ãã¤ã«ç«¯æ«ãªã©ã該å½ãã¾ãã ãunicorn ã ã¨ã¹ãã¼ã¯ã©ã¤ã¢ã³ãã®å½±é¿ãåãããããã¨ã¯ unicorn ã¯ããã»ã¹ã¢ãã«ã®ãµã¼ãã§ãããblocking I/O ã¢ãã«ãæ¡ç¨ãã¦ãã¾ããã¤ã¾ããã¯ã©ã¤ã¢ã³ãã¨ã®éä¿¡ä¸ããã»ã¹ãå°æãããã¨ãããã¨ã§ãã ä¾ãã° unicorn ãã¯ã¼ã«ããã»ã¹ã3ã¤ç«ã¡ä¸ãã¦ãã¦ãããã¸éä¿¡å®äºã«10åããããããªã¹ãã¼ã¯ã©ã¤ã¢ã³ãã3ã¤æ¥ç¶ããããâ¦ãç¶ãã¯ã©ã¤ã¢ã³ãã¯ã¹ãã¼ã¯ã©ã¤ã¢ã³ãã®éä¿¡ãå®äºããã¾ã§å®è¡ãå¾ ããªããã°ãªããªããªãã¾ããã
ActiveRecordã«ãããã¢ãã«ã®ãé¢é£ãã¨ã³ã¼ã«ããã¯ã®ä½¿ãæ¹ï¼éçºç¾å ´ã§ã¡ããã¨ä½¿ããRails 4å ¥éï¼6ï¼ï¼1/3 ãã¼ã¸ï¼ ã¨ã³ã¿ã¼ãã©ã¤ãºé åã§ã®æ¡ç¨ãå¢ãã¦ããRuby on Railsã使ã£ã¦Webã¢ããªã±ã¼ã·ã§ã³ãä½ãããã®å ¥éé£è¼ãææ°çã®4ã«å¯¾å¿ãã¦ãã¾ããä»åã¯ãActiveRecordã«ãããã¢ãã«ãªãã¸ã§ã¯ãå士ã®ã¤ãªããã表ããé¢é£ãã¨ã¤ãã³ããçºçããéã«å®è¡ãããå¦çãæå®ãã¦ãããã³ã¼ã«ããã¯ããªã©ã«ã¤ãã¦ã
ã¾ã¨ããªæç« ã«ãããã®ã ãã©ãããããä½åããªãã®ã§ãè¨é²ã®ããã«ç®æ¡æ¸ãã§ã¡ã¢æ¸ããæ®ãã¾ããç¬å¦ã§Ruby (on Railsï¼ãå¦ã¶ããã«ãã¾ãåå¦è åãã®ã¾ã¨ããªæ å ±ãå°ãªãããå以ä¸ã®äºä¾ã¯ããããªãã¨èª¿ã¹ã¦æã£ãã®ã¨ï¼èªåã§è¨ã£ã¦ãã¿ã¾ããï¼ãããããå¦ã¶äººãå¢ããã ããããããã®åèã«ãªãã°ã¨ãã 2015å¹´5æ20æ¥ã追è¨ãâãâ»æ¡ç¨ã§ããããåéçµäºããããã¨ããããã¾ããã éçºã¡ã³ãã¼ãåéãã¦ãã¾ããæ欲ã¨è½åãå ¼ãåããè¥è ãæè¿ãã¾ããã¹ãã«ã¯ããã®è¨äºãæ¸ããå½æã®åãããããã°okã§ãã 30ruby.hatenablog.com 2017å¹´11æ23æ¥ãè¿½è¨ ããã³ãã¨ã³ã¸ãã¢ãåéãã¾ãï¼ããæ°ããã£ã¦ãå®åçµé¨ãã£ã¦ãEdTechã®æ¬å½ã¨ãã¦æè²ãæ ¹æ¬ããå¤ãã¦ããã¨ããããã·ã§ã³ã«å ±æãã¦ãã£ããã«èµ°ã£ã¦ãããæ¹ãæ¢ãã¦ã¾ãï¼ www.wantedl
ã¢ã¯ã»ã¹ã©ã³ãã³ã°ãä½ã£ã¦ã¿ããï¼ ä»ãRails4 ã使ã£ã¦ã¢ã¯ã»ã¹ãã°ããã©ã³ãã³ã°ä½ã£ã¦ã¿ãããªãã¼ã¨æã£ã¦ããã§ãããã¿ããªã©ããã£ã¦ãã ããã£ã¦èãã¦ã¿ãã¨ããã Fluentd ã£ã¦ã®ãçµã¿è¾¼ãã ãã§ç°¡åã«éè¨ã¨ãã§ãããã¼ã£ã¦è©±ã ã£ãã®ã§ã使ã£ã¦ã¿ã¾ããã Fluentd ã¨ã¯ ã¾ãèªã¿æ¹ã¯ã ããµãã¼ããã¨ã§ãã¼ãã§ãã£ã¦ãããµãã¼ããã©ãã¨ããããªãã£ã½ãã§ããd ã¯ãã¶ããã¼ã¢ã³ã® d ã è²ã 説æé¢åãªãã§çç¥ãã¾ããããã°åéå ã¨ãåºåå ãç°¡åã«è¨å®ã§ãã¦ãèªåã®æ¬²ããå½¢ã§ãã°ä¿æã§ãã¾ããã¼ã£ã¦æãã£ã½ãããªã®ã§ã ãã·ã§ã«ã¹ã¯ãªããã§å¦çãã tail ã®å¦ççµæããã¡ã¤ã«ã«ããnginx ããåºåãããã¢ã¯ã»ã¹ãã°ã mongoDB ã«ãã¨ãããããå¦çãèªåã§æ¸ãå¿ è¦ãªããç°¡åãªè¨å®ã ãã§ããã¡ããã 詳ãã㯠â æè»ãªãã°åéãå¯è½ã«ãããfluentd
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}