第1å: ã¤ã³ã¹ãã¼ã«
2010/04/24
é»åæ¸ç±ãã¯ãããï¼Rails3 (1)ããé人åºç社ããçºå£²ããã¾ãã(2011å¹´2æ)ã
ãã®é£è¼ã®å 容ããã¼ã¹ã«ãªã£ã¦ãã¾ãããã¡ããå¤§å¹ ã«å çããã¦ãã¾ããä¾¡æ ¼ã¯1,000åï¼ç¨è¾¼ã¿ï¼ã§ãã
Ruby ã®ã¤ã³ã¹ãã¼ã«
ãã®é£è¼ã«ãã£ã¦åã㦠Ruby ã«è§¦ããæ¹ãããã£ãããããããã¾ãããã
Ruby on Rails ã使ãå§ããã«ã¯ãã¾ãããã°ã©ãã³ã°è¨èª Ruby ã®ã¤ã³ã¿ã¼ããªã¿ãå¿ è¦ã§ãã
次ã®ãã¼ã¸ã«è©³ããæé ãæ¸ãã¦ããã¾ãã®ã§ãã¾ã㯠Ruby ãã¤ã³ã¹ãã¼ã«ãã¦ãã ããã
- Windowsã¸ã®ã¤ã³ã¹ãã¼ã« - Rubyãªãã¡ã¬ã³ã¹
- Mac OS Xã¸ã®ã¤ã³ã¹ãã¼ã« - Rubyãªãã¡ã¬ã³ã¹
- Linuxã¸ã®ã¤ã³ã¹ãã¼ã« - Rubyãªãã¡ã¬ã³ã¹
2011å¹´2æ1æ¥ç¾å¨ã1.8.6, 1.8.7, 1.9.2 ã¨ãã3ã¤ã®ãã¼ã¸ã§ã³ã® Ruby ããã使ããã¦ãã¾ãããRails 3.0 ã§ã¯ 1.8.7 ã¾ã㯠1.9.2 ãé¸æãã¦ãã ããããã ãããã®é£è¼ã§ã¯ãRuby 1.8.7 ã®ä½¿ç¨ãåæã¨ãã¦è©±ãé²ãã¦ããã¾ãã
ã¤ã³ã¹ãã¼ã«ãå®äºããããã¿ã¼ããã«ï¼ã³ãã³ãããã³ããï¼ãéãã¦ã次ã®ã³ãã³ããå®è¡ãã¦ãã ããã
ruby -v
ruby 1.8.7
ã§å§ã¾ãæååãç»é¢ã«è¡¨ç¤ºãããã°ãã¤ã³ã¹ãã¼ã«ãæåãã¦ãã¾ãã
[æ´æ°] Mac OS Xã¸ã®ã¤ã³ã¹ãã¼ã«æé ã説æãããã¼ã¸ã®ãªã³ã¯ã追å ãã¾ããããã使ããã¦ããRubyã®ãã¼ã¸ã§ã³ãã1.9.1ãé¤å»ãã¾ããã(2010/02/01)
Ruby on Rails ã®ã¤ã³ã¹ãã¼ã«
次ã«ãRuby on Rails ãã¤ã³ã¹ãã¼ã«ãã¾ãããã
Ruby on Rails ã¯ãgem ããã±ã¼ã¸ã¨ãã¦é å¸ããã¦ãã¾ãã
ã¿ã¼ããã«ã§ã次ã®ã³ãã³ããå®è¡ãã¦ãã ããã
gem install rails --version=3.0.0
ã¤ã³ã¿ã¼ãããæ¥ç¶ç°å¢ããµã¼ãã®æ··ã¿å ·åã«ãããã¾ãããå°ãæéããããã¾ããæ°é·ã«å¾ ã£ã¦ãã ããã
ã¤ã³ã¹ãã¼ã«æéãç縮ããã人ã¯ã--no-ri --no-rdoc
ãªãã·ã§ã³ãä»ãã¦ããã¥ã¡ã³ãã®çæãçç¥ããã¨ããã§ãããã
ãã§ã« Rails 3.0.0 ã® beta çã RC çãã¤ã³ã¹ãã¼ã«ãã¦ããå ´åãarel ã®ææ°çãå¥éã¢ãããã¼ãããå¿
è¦ãããããããã¾ãããgem install arel
ãå®è¡ãã¦ãã ããã
ã¤ã³ã¹ãã¼ã«ãå®äºãããã念ã®ãã次ã®ã³ãã³ãã§ç¢ºèªãã¦ã¿ã¾ãããã
gem list
ã¤ã³ã¹ãã¼ã«æ¸ã¿ã® gem ããã±ã¼ã¸ã®ä¸è¦§ã表示ããã¾ãã®ã§ããã®ä¸ã« rails (3.0.0)
ã¨ããè¨è¿°ãè¦ã¤ããã° OK ã§ãã
rails ãã©ãã«ã¤ã³ã¹ãã¼ã«ãããã®ãå¿é ãªæ¹ã¯ã次ã®ã³ãã³ãã§èª¿ã¹ã¦ãã ããã
gem which rails
ãã¦ãRuby on Rails ãã¤ã³ã¹ãã¼ã«ãã㨠rails
ã¨ããã³ãã³ãã使ããããã«ãªãã¾ãã
æå¾ã«ããã®ã³ãã³ããå®è¡ãã¦ã第1åãçµãããã¨ã«ãã¾ãããã
rails -v
ãã¼ã¸ã§ã³çªå· Rails 3.0.0
ã表示ãããã¯ãã§ããããããã§ããããã
[æ´æ°] ãã®è¨äºã¯ãå½å Rails 3.0.0.beta3 ããªãªã¼ã¹ãããé (2010å¹´4æ)ã«å ¬éããã¾ããããRails 3.0.0 ã®æ£å¼ãªãªã¼ã¹ã«åããã¦æ¸ãæãã¾ããã(2010/08/30)