Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
é ã¾ããªãããMac Yosemiteã«Railsã®ã¢ãã³ãªéçºç°å¢ãæ§ç¯ããã¾ã§ã®ä¸é£ã®æé ãã¾ã¨ãã¾ããã éçºç°å¢ã«ã¯å¥½ã¿ãããã¨æãã¾ãããMacãæ°ããè²·ã£ãããOSãåã¤ã³ã¹ãã¼ã«ããæãªã©ã¯è¯ãã£ãã使ã£ã¦ãã ããï¼ ð Xcodeã®ã¤ã³ã¹ãã¼ã«XCode Mac App StoreããXcodeãã¤ã³ã¹ãã¼ã«ã å¿ é ã§ã¯ãªãããã§ãããã³ãã³ãã©ã¤ã³ããã®ã©ã¤ã»ã³ã¹ã®åæã
OSXã«æ¨æºã¤ã³ã¹ãã¼ã«ããã¦ããirbã¯ãæ®å¿µãªããæ¥æ¬èªãæååããããRubyã®æ¹ã¯æ¨æºã§æ¥æ¬èªã使ããããã«ãªã£ãã®ã«ãä½æ ãªãã ï¼ èª¿ã¹ã¦ã¿ãã¨ãRubyèªä½ã®æ¥æ¬èªå¦çã«ã¯åé¡ãªãã®ã ãã©ãirbãã³ãã³ãå ¥åãåãåãéã«ä½¿ã£ã¦ããã©ã¤ãã©ãªï¼libeditï¼ãæ¥æ¬èªã«å¯¾å¿ãã¦ããªãã®ãåå ãããã解決çã¯ãæ¥æ¬èªå¯¾å¿ã®ã©ã¤ãã©ãªï¼readlineï¼ã«åãæ¿ãããã¨ã æ¥æ¬èªã使ããªãç°å¢ irbã¯ã"readline"ãrequireãã¦ãã³ãã³ãå ¥åã©ã¤ãã©ãªãå©ç¨ãã¦ããã requireãã"readline"ã¯ã©ãã«ããã®ãï¼ irbãèµ·åãã¦ã以ä¸ã®ã³ãã³ããå ¥åãã¦ã¿ãã $ irb irb(main):001:0> puts $LOADED_FEATURES.grep /readline/ /System/Library/Frameworks/Ruby.fra
ãã¡ãã¡ã°ã°ã£ã¦åã£ããã¿ããªå°ããã¤éã£ã¦è©¦è¡é¯èª¤ããã®ã§ã¡ã¢ã ãããªæãã§ã¤ã³ã¹ãã¼ã«ã§ããã % sw_vers ProductName: Mac OS X ProductVersion: 10.9.4 BuildVersion: 13E28 % brew tap homebrew/dupes % brew install libxml2 libxslt libiconv % brew link libxml2 libxslt --force % bundle config build.nokogiri --use-system-libraries --with-xml2-include=`brew --prefix libxml2`/include/libxml2 --with-xml2-lib=`brew --prefix libxml2`/lib --with-xslt-in
Homebrew ãå©ç¨ãã¦ãã OS X 㧠Ruby 製 XML çãã¼ãµã¼ã§ãã Nokogiri ãã¤ã³ã¹ãã¼ã«ããã¨ãã®ã¡ã¢ãåºæ¬çã«å ¬å¼ãµã¤ãã®ãInstalling Nokogiriãï¼ä»¥ä¸ãå ¬å¼ãï¼ã®éãã ãããã¡ãã®æ å ±ãå¤ããªã£ã¦ããã®ã§ç¾å¨ã®ç¶æ ã«åããã¦å°ãã¢ã¬ã³ã¸ããã Homebrew ã§é¢é£ã©ã¤ãã©ãªãã¤ã³ã¹ãã¼ã«ããå¿ è¦ãªã©ã¤ãã©ãªã¯ libxml2 libxslt libiconvã® 3 ã¤ãå ¬å¼ã®è¨è¿°ã§ã¯ libiconv ã¯æåã§ãã«ãããããã«ãªã£ã¦ããããç¾å¨ã¯ formula ãç¨æããã¦ããã®ã§ Homebrew ã§ã¤ã³ã¹ãã¼ã«ãããã¨ãã§ããã 以ä¸ãå®è¡ã㦠Homebrew ã§ã¤ã³ã¹ãã¼ã«ããã brew install libxml2 libxslt libiconv ãã¹ã¦ keg-only ãªã®ã§ãbrew link ããå¿ è¦ã¯ãªã
UPDATED: 2017/11/27 æ¬è¨äºã¯2014å¹´å½åã®æ å ±ã§ãããç¾å¨ã¯å¤ããªã£ã¦ããå¯è½æ§ãããã¾ãã è¨äºä¸ã§ç´¹ä»ãã¦ããå種ãããã¯ãã®ææ°ããã¥ã¡ã³ãããåç §ä¸ããã ã¯ããã« OS X ã§æè¿æµè¡ã®ãã¼ã«ã¯ Ruby ã Python ãã¼ã¹ã®ãã®ãå¤ãã®ã§ãã ãã¨ãã¨ã¤ã³ã¹ãã¼ã«ããã¦ããåå¦çç³»ã¯ãã¼ã¸ã§ã³ãå¤ãã§ãã ãã®æ´æ°èªä½ã«ããããç´¹ä»ãã Homebrew çã使ã£ã¦ããè¨äºãå¤ãã ã©ãããæãä»ãã¦ãããè¿·ã£ããããã®ã§ãã¾ã¨ãã¦ããã¾ãã ç®æ¨ ããã±ã¼ã¸ããã¼ã¸ã£ Homebrew ã®ã¤ã³ã¹ãã¼ã« ã·ã¹ãã ããã©ã«ãã¨ã¯å¥ã« Git, JDK, Ruby, Perl, Python ã®ææ°çãã¤ã³ã¹ãã¼ã« 大ã¾ããªæµã ã·ã¹ãã ã«ããªã¤ã³ã¹ãã¼ã«ããã¦ãã Ruby 㧠Homebrew ãã¤ã³ã¹ãã¼ã« Homebrew ããå種追å ããã±ã¼ã¸
Anvil ã¨ãã便å©ãããªã¢ããªãè¦ã¤ããã®ã§è©¦ãã«ä½¿ã£ã¦ã¿ããOS X åã Rack ãµã¼ãã® Pow ã GUI ã§æä½ãããã¼ã«ãããã Anvil for Mac - Run your sites locally ã¤ã³ã¹ãã¼ã«ããã¨ä»¥ä¸ã®ããã«ã¡ãã¥ã¼ãã¼ã«ã¢ã¤ã³ã³ã表示ãããããããããã£ã¬ã¯ããªãæå®ããã ã㧠ãã£ã¬ã¯ããªå.dev ã¨ãããã¡ã¤ã³ãå©ç¨ã§ããããã«ãªãã xip.io ãå©ç¨ã§ããã®ã§ãhttp://example.192.168.0.1.xip.io ã¨ãã£ã URL ãå©ãäºã§ LAN å ã®ä»ã®ãã·ã³ãããã¢ã¯ã»ã¹ãå¯è½ã«ãªãã èªå㯠Ruby 㧠Web ã¢ããªã±ã¼ã·ã§ã³éçºãå ¨ç¶è¡ããªãã®ã ããã¼ã«ã«ç°å¢ã§ããããããã«ã¯ä¾¿å©ããã ã
ç¶ç¶çã¤ã³ãã°ã¬ã¼ã·ã§ã³ã®æé ã®ãã¡ããããã¤ã«ç¦ç¹ãå½ã¦ã¦ããã¹ãã®å®è¡ãããGitã«ããHerokuç°å¢ã¸ã®ãããã¤ã¾ã§ãèªååããæ¹æ³ã解説ãMacåãã®Growlã使ã£ã¦å®è¡çµæãéç¥ããæ¹æ³ã説æã â åå é£è¼ INDEX 次å â é£è¼ç¬¬1åãJenkinsã使ã£ã¦ã¿ãããã§ã¯Macï¼OS Xï¼ï¼Linuxï¼Windowsã¸ã®ã¤ã³ã¹ãã¼ã«æ¹æ³ãã第2åãJenkinsã§ãã¹ããå®è¡ãã¦ã¿ãããã§ã¯ã¦ããããã¹ãããã³ã¤ã³ãã°ã¬ã¼ã·ã§ã³ãã¹ããä½æããJenkinsããå®è¡ããææ³ã解説ãããããã¾ã§èªãã§ããã ããèªè ã®çãããJenkinsãã¤ã³ã¹ãã¼ã«ãã¦èªåãªãã®ä½¿ãæ¹ã模索ãã¦ãããã¨ã¨æãã ãã¦ãé£è¼ç¬¬1åã§ãç¶ç¶çã¤ã³ãã°ã¬ã¼ã·ã§ã³ã¨ã¯æ¬¡ã®ãããªæé ã®ç¹°ãè¿ãã ãã¨èª¬æããã®ãè¦ãã¦ããã ãããï¼ ããã°ã©ãã³ã° ãã¹ãã®å®è¡ ãªãã¡ã¯ã¿ãªã³ã° ããã㤠ä»å
å ããå ¥ã£ã¦ãrubyãææ°çã§ããsudoã¨ãã§å£ãã¨ãã£ãããªã®ã§ã % brew install readline openssl % CONFIGURE_OPTS="--with-readline-dir=`brew --prefix readline` --with-openssl-dir=`brew --prefix openssl` --with-gcc=clang" rbenv install 2.0.0-p247 % rbenv global 2.0.0-p247 % rbenv rehash % gem install bundler rbenv-rehash
ç¶ç¶çã¤ã³ãã°ã¬ã¼ã·ã§ã³ãã¼ã«ãJenkinsãã®ä½¿ãæ¹ãåºç¤ãã解説ããé£è¼ãã¹ã¿ã¼ããååã¯ãJenkinsã®æ¦è¦ã¨ã¤ã³ã¹ãã¼ã«æé ãç°¡åãªã¸ã§ãã®ç»é²æ¹æ³ã説æããã é£è¼ INDEX 次å â Jenkinsã¨ã¯ä½ãï¼ ãJenkinsãã¨ãããã¼ã«ããåãã ãããï¼ æ å ±ã«ææãªèªè ã§ããã°ãç¶ç¶çã¤ã³ãã°ã¬ã¼ã·ã§ã³ï¼CIï¼ãã¨ããè¨èã¨ã¨ãã«ãããä¸ã§ä¸åº¦ãäºåº¦ã¯è¦ããã¨ããããããããªããããããªãããç¶ç¶çã¤ã³ãã°ã¬ã¼ã·ã§ã³ãã¨ããè¨èã®é£è§£ãããJavaã§ä½æããã¦ãããã¨ããç¹ã§ãæ·å± ãé«ãæããããå°å ¥ãè¦éã£ã¦ããããã°ã©ãã¼ã®æ¹ãããã®ã§ã¯ãªãã ãããã ãããªæ¹ã ã«ã¨ã£ã¦ãæ¬é£è¼ãJenkinsã使ããã£ããã«ãªãã°å¹¸ãã ãæ¬é£è¼ã§ã¯ãJenkinsã®ä½¿ãæ¹ãåºç¤ãã説æããããã®èª¬æç¨ã®ããã°ã©ãã³ã°ç°å¢ã¨ãã¦ã¯Rubyãæ¡ç¨ãã¦ããããä»ã®ç°å¢ã®æ¹ã«ãåèã¨
ä¸ã¤åã®ã¨ã³ããªã¼ã§æ°è¦ Mac ã«ã¤ã³ã¹ãã¼ã«ãã¦ããããã¢ããªã®ã¾ã¨ããç´¹ä»ãã¾ãããããã³ãã¨ã³ãéçºããã¦ããã«ããããã¢ããªãã¤ã³ã¹ãã¼ã«ããã ãã§ãªãå¿ è¦ã«å¿ãã¦æ§ã ãªåä½ç°å¢ãæ§ç¯ããå¿ è¦ããã訳ã§ããããããã¾ãä½ãã¨æéã®ãããé¢åãªä½æ¥ã ã£ãããã¾ããé½åº¦ã°ã°ã£ã¦ã¯åèã«ãªããããªæ å ±ã«å£ã£ã¦è©¦ã¿ããããã®æ å ±ãå¤ãã£ããæ§ç¯ããããã®åææ¡ä»¶ãå¾®å¦ã«ç°ãªã£ããã¨ããã£ãããã®ã¾ã¾åèã«ãããã¨ãé£ãããã¨ãã»ã¨ãã©ã ã£ãããã¾ãã ç¾ç¶ãåã¯Â Mac ã®éçºç°å¢ã®æ§ç¯ã«Â Homebrew ã¨ããããã±ã¼ã¸ç®¡çãã¼ã«ãå©ç¨ãã¦ãã¾ããæµ·å¤ã¨æ¯è¼ãã¦æ¥æ¬ã§ã®å©ç¨è ãå¤ããã¨ããæ¥æ¬èªã®æ å ±ãå¤ãåºåã£ã¦ãããã¨ã主ãªçç±ã§ãã Homebrewï¼ãã¼ã ãã«ã¼ï¼ã¯ãMac OS Xãªãã¬ã¼ãã£ã³ã°ã·ã¹ãã ä¸ã§ã½ããã¦ã§ã¢ã®å°å ¥ãåç´åããããã±ã¼ã¸ç®¡çã·ã¹ãã ã®ã²ã¨ã¤ã§ãã
2014/4/10è¿½è¨ brewdlerã®æ©è½ã¯homebrewã«å å«ããã¾ããã ãã®è¨äºã¯å¤ãã®ã§ã¿ããªhomebrew使ãã¾ãããï¼ çµç·¯: https://github.com/Homebrew/homebrew/pull/24107 Brewfileãæ¸ãã¦ãhomebrewãã¤ã³ã¹ãã¼ã«ããå¾ã«ä»¥ä¸ã®ã³ãã³ããå®è¡ããã°åé¡ç¡ãã§ãã éçºç°å¢ã®æ§ç¯ã®æ§ç¯ éçºç°å¢ã®æ§ç¯ãVagrantã使ã£ã¦æ§ç¯ããããã«ãªã£ãã®ã ãã©ã éçºç°å¢ã®æ§ç¯ã®æ§ç¯ãã¤ã¾ãã¨ãããã¹ãã¨ãªãã¹ãMac OS Xãã·ã³å´ã® ç°å¢æ§ç¯ã«ã¤ãã¦ããªãã楽ããããªãã¨æã£ã¦ã homebrewãBundlerã®ãã¨ãBrewfileã¨ãä½ã£ã¦ç®¡çã§ãããããã®ã« ã£ã¦æã£ã¦æ¤ç´¢ããããã£ããããã£ãããã£ãã brewdler 使ãæ¹ brewdlerãã¤ã³ã¹ãã¼ã«
Windowsã§ã¯é¢åã ã£ããã¨ããMacã§ã¯æå¤ã¨ç°¡åã«ã§ããããªãã¦ãã¨ãå¤ãããããã§ãã ãã®ãã¡ã®ä¸ã¤ãUNIXãã¼ã«ã使ãããã¨è¨ãäºï¼ ããã使ããã¨ã¡ãã£ã¨ããä½æ¥ããã大ããããªä½æ¥ã¾ã§æè»ã«è¡ããã¨ãåºæ¥ãæ§ã«ãªã£ãããã¾ãã ç§èªèº«ã¯ããã¾ã§ã¬ãããªä½¿ãããã§ã¯ãªãã®ã§ãããã¡ãã£ã¨ããå ´é¢ã§ããã¨ä¾¿å©ã§ãããç¹ã«ãã¡ã¤ã«æä½ãªãããè¡ãã¨ãã«ãã使ã£ã¦ã¾ããã ããã§ãMacã§ä½¿ãããããããã±ã¼ã¸ã管çãã¦ãããã·ã¹ãã ãHomebrewããããMountain Lionç°å¢ã«ã¤ã³ã¹ãã¼ã«ãã¦ã¿ããã¨æãã¾ãã MacPortsãªãã¦è¨ãã®ãããããã§ããããHomebrewã¤ã¤ã¨ï¼ï¾ï¾ï¾ï¾!ãã¨ãããã®ã§ãã¡ããã¤ã³ã¹ãã¼ã«ã ãã®è¨äºã¯æé ãå¿ãã¦ãã¾ãã§ãããç§ã¸ã®ã¡ã¢ã¨ãªã£ã¦ããã¾ãã®ã§ãç´°ããé¨åã«ã¤ãã¦ã¯ãäºæ¿ããã ãã¾ããããé¡ããã¾ãã ï¼ï¼ Ja
ã¯ããã« ããã«ã¡ã¯ãå«ããã¨ã³ã¸ãã¢ã®è¥¿æ(@Sixeight)ã§ãã ãããã Kyoto.rb ã¨ããã³ãã¥ããã£ãå§ãã¾ããã ã©ãããããããé¡ããã¾ãã ä»æ¥ã¯ããããå··ã§è©±é¡ã ã£ã(ä¹ãé ããæããã¾ãã) rbenv ã«ã¤ãã¦åãä¸ãããã¨æãã¾ãã å¼ç¤¾ã§ã¯ã¾ã RVMã主æµãªã®ã§ãããã¢ã«ãã¤ãã®è¥è ããã¶ãããã¦å°ããã¤ã·ã§ã¢ãå¢ããã¦ãã¾ãã rbenv ã£ã¦ãªã« https://github.com/sstephenson/rbenv ã¤ã³ã¹ãã¼ã«æ¸ã®è¤æ°ã®Rubyããããªã«åãæ¿ãã¦ãããã¹ãããã¼ã«ã§ãã 37signalsã®sstephensonãã¨Sam Stephensonããã«ãããããã¯ãã§ãã ä»ã«ããã£ãè¯ããããã¯ããæ¸ãã¾ãããã¦ãã¾ãã æåã«README.mdããæç²ã rbenvããã¦ãããã㨠rbenvã¯3ã¤ã®ãã¨ãæä¾ãã¦ããã¾ãã
åå(Macã§éçºç°å¢æ§ç¯ã®ããã®äºåæºå)ã«å¼ãç¶ãMacã«Railsã®éçºç°å¢ãæ§ç¯ãããããã®ã¡ã¢ã ä»åã¯Rubyãå ¥ãã¾ãã ã¶ã£ã¡ããMacã«ã¯æ¨æºã§Rubyãå ¥ã£ã¦ã¾ããããã®ãã¼ã¸ã§ã³ã¯1.8.7ã¨å°ãå¤ãã % ruby -v ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0] ã¨ããããRuby2.0ãåºãã®ã§ãããããµãã¼ã(ãããä»å¹´ã®7æ?)ãåãã¾ãã #追è¨(2013.03.24)ï¼ 2013å¹´6æã¾ã§ã§ããã1.8.7ã®ä»å¾ã«ã¤ãã¾ã㦠æ¬æ¥ãªãææ°ã¨ãªãRuby2.0ãå ¥ãããã¨ãããªã®ã§ãããä»äºã§ã¯1.9ç³»ãã¡ã¤ã³ãªã®ã§ããããã£ã大人ã®äºæ ãèæ ®ãã¦Ruby1.9.3ãå ¥ãã¾ãã ãã ããä»å¾Ruby2.0ãå ¥ããããããRubyã®ãã¼ã¸ã§ã³ç®¡çãã¼ã«ãå©ç¨ãã¦æ§ç¯ãã¾ãã ã¡ãª
çµæ§åã«åå¨ãç¥ã£ã¦ããå ¨ç¶è§¦ã£ã¦ãã¾ããã§ããããå°ã 触ã£ã¦ã¿ãã®ã§ãã®è¨é²ãã¤ãã¦ããã¾ãã詳ãã話ã¯æ¬å®¶ã®ããã¥ã¡ã³ãããä»æã§æ¸ããã¦ããè¨äºãªã©ãåç §ããã¨è¯ãã¨æãã¾ãã http://vagrantup.com/ ä»åè¡ã£ããã¨ã¯ãVagrantã§ä»®æ³ãã·ã³ã®ç¨®ã使ã£ã¦ç°å¢ãä½æããããã®å段éã種ä½ãã§ããVagrantã¯ä»®æ³ãã·ã³ãå©ç¨ãã¾ãããä»®æ³ãã·ã³èªä½ã®æ§ç¯ã¯è¡ãã¾ãããäºåã«ä½ããã¦ããBase Boxã¨å¼ã¶ä»®æ³ãã·ã³ã®ã²ãªå½¢ãå©ç¨ãã¾ãã 以ä¸ã®ãµã¤ãã§ããããã®Base Boxãå ¬éããã¦ãã¾ãããã¤ã³ã¹ãã¼ã«å¨ã¨ãã¦ã¯ã¤ã³ã¹ãã¼ã«ãé£ã°ãã¦ãã¾ã£ã¦ã¯æ¨ã¿ããç¡ããªã£ã¦ãã¾ãã®ã§ãBase Boxãä½ãã¨ããããæãã¤ãããã¨èãã次第ã§ãã http://www.vagrantbox.es/ å®è¡ç°å¢ãæºåãã Vagrantã¯Rubyã§æ¸ããã¦ãããge
rbenv + ruby-build + rbenv-gemset ã«ç§»è¡ãã¦ã¿ãrbenv + ruby-build + rbenv-gemset ã«ç§»è¡ãã¦ã¿ã 2012å¹´ 3æ6æ¥ ã«ãã´ãªã¼ : Apple . Mac . Programming . Ruby æ稿è : henry ã³ã¡ã³ããæ¸ã ä½ã¨ãªãRVMãã移è¡ãã¦ã¿ãã rbenv ruby-build rbenv-gemset ã¤ã³ã¹ãã¼ã« Homebrewã使ã£ã¦æ¥½ã«ã¤ã³ã¹ãã¼ã«ãããHomebrewãã¤ã³ã¹ãã¼ã«ãã¦ãªã人ã¯ãã¡ããåèã«ã $ brew install rbenv ruby-build rbenv-gemset $ echo '# rbenv' >> $HOME/.profile $ echo 'eval "$(rbenv init -)"' >> $HOME/.profile $ source
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}