ruby17

5ad0bb268dd2605b09165d464308cb7e?s=47 Kuniaki IGARASHI
September 28, 2013

 ruby17

第17回 Rails開発環境構築
2013.10.10

5ad0bb268dd2605b09165d464308cb7e?s=128

Kuniaki IGARASHI

September 28, 2013
Tweet

Transcript

  1. 3VCZPO3BJMTߨٛ ୈճ3BJMT։ൃ؀ڥߏங ޒेཛྷ๜໌ UXJUUFSJHBJHB IUUQXXXGBDFCPPLDPNLVOJBLJJHBSBTIJ BUҰڮେֶ χϑςΟגࣜձࣾدෟߨٛ ࣾձՊֶʹ͓͚Δ৘ใٕज़ͱ ίϯςϯπ࡞੒*7

  2. χϑςΟגࣜձࣾ ఏڙ

  3. ޒेཛྷ๜໌ ߨࢣ גࣜձࣾTQJDFMJGF UXJUUFSJHBJHB IUUQTHJUIVCDPNJHBJHB IUUQXXXGBDFCPPLDPNLVOJBLJJHBSBTIJ

  4. ᖛ࡚݈ޗ 5FBDIJOH"TTJTUBOU qVYqFY JOD ถࠃ๏ਓ UXJUUFSINTL IUUQTHJUIVCDPNINTL IUUQXXXGBDFCPPLDPNIBNBDIBOH

  5. ࠓ೔΍Δ͜ͱ ߨٛʹ͍ͭͯ 3BJMT։ൃ؀ڥͮ͘Γ ͸͡Ίͯͷ8FCΞϓϦͮ͘Γ 

  6. ධՁํ๏ ԋश՝୊Λఏग़͍͖ͯͨͩ͠੒੷ධՁΛߦ͍·͢ɻ ·ͨɺतۀ΁ͷߩݙ౓΋ධՁͷର৅ͱ͠·͢ɻ ग़੮͕तۀճ਺ͷ෼ͷʹຬͨͳ͍৔߹͸ʮ'ʯͱ͠·͢ɻ 

  7. ࣗश༻3BJMTࢿྉ ಛʹڭՊॻ͸࢖͍·ͤΜ͕ɺࣗश༻ʹ͸ҎԼͷࢿྉΛ͓קΊ͠·͢ɻ 3BJMT5VUPSJBM XFC IUUQSBJMTUVUPSJBMKQ WFSTJPO  3BJMT(VJEF XFC &OHMJTI

    IUUQHVJEFTSVCZPOSBJMTPSH 3BJMTʹΑΔΞδϟΠϧ8FCΞϓϦέʔγϣϯ։ൃୈ൛ IUUQXXXBNB[PODPKQEQ վగ৽൛جૅ3VCZPO3BJMT IUUQXXXBNB[PODPKQEQ ͨͷ͍͠3VCZ IUUQXXXBNB[PODPKQEQ 
  8. ߨٛࢿྉஔ͖৔ աڈͷࢿྉ͕%-Ͱ͖·͢ɻ IUUQTHJUIVCDPNJHBJHBIJUPUTVCBTIJSVCZ

  9. ࡶஊɾ࣭໰༻GBDFCPPLάϧʔϓ ޙظ΋ͦͷ··࢖͑·͢ɻࢥ͍ग़ͨ͠ͱ͖ʹࡶஊ΍࣭໰ͯ͠΋Βͬͯ0,ɻ अຐͳΑ͏ͳΒάϧʔϓ͔Βୀձ͍ͯͩ͘͠͞ɻ IUUQTXXXGBDFCPPLDPNHSPVQTIJUPUTVCBTIJSC ɾՃೖඇՃೖ͸ࣗ༝Ͱ͢ ɾՃೖඇՃೖ͸੒੷ʹؔ܎͠·ͤΜ ɾࢀՃऀҰཡ͸ެ։͞Ε·͢ ɾॻ͖ࠐΈ͸ࢀՃऀͷΈݟ͑·͢ ɾر๬ऀ͸ΞΫηεͯ͠ࢀՃਃ੥͍ͯͩ͘͠͞ ɾࡶஊɺ࣭໰ɺٞ࿦ͳͲԿͰ΋ؾʹͤͣͲ͏ͧʙ

    ɾ࣭໰ʹ౴͑ΒΕΔਓ͸౴͍͑ͯ͋͛ͯͩ͘͞ ɾߨࢣਞ΋͓౴͑͠·͢ ɾೖͬͨΒܰࣗ͘ݾ঺հ͓Ͷ͕͍͠·͢ 
  10. 3VCZPO3BJMTͱ͸ 3VCZͰॻ͔Εͨ8FCΞϓϦϑϨʔϜϫʔΫ 

  11. $00,1"% 3BJMT੡ 

  12. ৯΂ϩά 3BJMT੡ 

  13. 8FC1BZ 3BJMT੡ 

  14. 0INZ(MBTTFT 3BJMT੡ 

  15. UNJY 3BJMT੡ 

  16. ͋ͱͰ 3BJMT੡ 

  17. UXJUUFSݩ3BJMT੡ 

  18. 3VCZͷجૅ͕਎ʹ͖ͭɺ؆୯ͳϓϩάϥϜΛॻ͚Δ ɹXJLJQFEJBΞΫηε਺ղੳ࣮श 3VCZPO3BJMTͷجૅ͕਎ʹ͖ͭɺ؆୯ͳΞϓϦΛ࡞ΕΔ 3VCZʹؔ͢Δෆ໌఺͕͋ͬͨͱ͖ʹௐ΂ΒΕΔ ͜ͷߨٛΛड͚Δͱ ͜Ε͕Ͱ͖ΔΑ͏ʹͳΔ ༧ఆ 

  19. 3VCZͷجૅ͕਎ʹ͖ͭɺ؆୯ͳϓϩάϥϜΛॻ͚Δ ɹXJLJQFEJBΞΫηε਺ղੳ࣮श 3VCZPO3BJMTͷجૅ͕਎ʹ͖ͭɺ؆୯ͳΞϓϦΛ࡞ΕΔ 3VCZʹؔ͢Δෆ໌఺͕͋ͬͨͱ͖ʹௐ΂ΒΕΔ ͜ͷߨٛΛड͚ͨΒ ͜Ε͕Ͱ͖ΔΑ͏ͳͬͨ Նֶظ 

  20. 3VCZͷجૅ͕਎ʹ͖ͭɺ؆୯ͳϓϩάϥϜΛॻ͚Δ ɹXJLJQFEJBΞΫηε਺ղੳ࣮श 3VCZPO3BJMTͷجૅ͕਎ʹ͖ͭɺ؆୯ͳΞϓϦΛ࡞ΕΔ 3VCZʹؔ͢Δෆ໌఺͕͋ͬͨͱ͖ʹௐ΂ΒΕΔ ͜ͷߨٛΛड͚ͨΒ ͜Ε͕Ͱ͖ΔΑ͏ͳΔ ౙֶظ 

  21. ͜Μͳ͜ͱΛ΍Δ༧ఆͰ͢ 3BJMTͷجૅ ࣸਅΞοϓϩʔυΞϓϦ࡞Γ ࣗ࡞ΞϓϦͷωοτެ։ ࣗ༝՝୊ΞϓϦ੍࡞ԋश ΄͔ߟ͑த 

  22. IUUQXXXqJDLSDPNQIPUPTVTGCQT ࡞ͬͨ΋ͷ͸ཤྺॻʹॻ͚·͢ɻ γεςϜؔ࿈ͷ৬Λड͚Δਓ޲͚ 

  23. લظͷ಺༰Λཧղ͍ͯ͠Δ͜ͱΛલఏ ʹͯ͠ਐΊ·͢ͷͰɺલظΛडߨͯ͠ ͍ͳ͍৔߹͸೉͍͠ͱࢥ͍·͢ɻ डߨ͞ΕΔ৔߹͸ɺߨٛࢿྉஔ͖৔ϖ ʔδΛಡΜͰલظ෼Λࣗश͓͍ͯͯ͠ ͍ͩ͘͞ɻ डߨ৚݅ IUUQTHJUIVCDPNJHBJHBIJUPUTVCBTIJSVCZ 

  24. ٳߨ࿈བྷ ݄೔ ೔ͷߨٛ͸ ٳߨͰ͢ɻ 

  25. ҎԼͷ؀ڥߏஙΛߦ͍·͢ɻ ؀ڥߏங 8JOEPXT .BD 3BJMT*OTUBMMFS·ͨ͸7.6CVOUV ͲͪΒΛ࢖ͬͯ΋͔·Θͳ͍Ͱ͢ɻ ՆֶظͰ؀ڥߏஙͨ͠ํ͸ͦͷ؀ڥʹগ͠ίϚϯυΛଧͭ͜ ͱͰ؀ڥߏஙͰ͖·͢ɻ ʢৄ͘͠͸ޙड़ͷʮ؀ڥߏஙࢿྉʯࢀরʣ HFNVQEBUFSBJMTOPSJOPSEPD

    SBJMTW ֬ೝ 3BJMTYͱग़Ε͹0, ࢿྉ࡞੒࣌࠷৽ 
  26. ҎԼͷόʔδϣϯΛ૝ఆ͍ͯ͠·͕͢ɺߨٛ ظؒதʹόʔδϣϯΞοϓ͢ΔͷͰ৽͍͠΋ ͷʹมߋʹͳΔ͔΋͠Ε·ͤΜɻ 3VCZPO3BJMT։ൃ؀ڥ 3VCZQPSQ 3VCZPO3BJMT ೥݄೔ݱࡏͷ࠷৽͸ 

  27. 3VCZ 3BJMT؀ڥߏங ͷࢿྉΛݟͯ؀ڥߏஙΛ͍ͯͩ͘͠͞ɻ ˞͏·͘Ͱ͖ͳ͍৔߹͸ϑΥϩʔ͠·͢ͷͰ੠ Λ͔͚͍ͯͩ͘͞ IUUQTTQFBLFSEFDLDPNJHBJHBCVJMEJOHSVCZEFWFOW ؀ڥߏஙࢿྉ 

  28. 8FCΞϓϦͷ࢓૊Έͷ ؆୯ͳઆ໌ 

  29. 8FC4FSWFS 8FC"QQ #SPXTFS ϦΫΤετ 63-IUUQDPPLQBEDPN 8FCΞϓϦͷجຊಈ࡞ IUUQDPPLQBEDPN ϒϥ΢βʹ63-Λ ೖྗͯ͠&OUFS ϦΫΤετ͕ඈͼ·͢ɻ

    
  30. 8FC4FSWFS 8FC"QQ #SPXTFS ϦΫΤετ Ϩεϙϯε 63-IUUQDPPLQBEDPN )5.- 8FCΞϓϦͷجຊಈ࡞ IUUQDPPLQBEDPN Ϩεϙϯεͱͯ͠)5.-͕ฦͬͯ͘Δ

    
  31. )5.- )ZQFS5FYU.BSLVQ-BOHVBHF 8FCϖʔδΛهड़͢ΔͨΊͷݴޠ 

  32. ϒϥ΢βͰ)5.-දࣔ ӈΫϦοΫ͔ΒιʔεΛදࣔ 

  33. 8FC4FSWFS 8FC"QQ #SPXTFS ϦΫΤετ Ϩεϙϯε 63-IUUQDPPLQBEDPN )5.- ϒϥ΢βͷओͳػೳ IUUQDPPLQBEDPN ϦΫΤετΛඈ͹͢

    ϨεϙϯεͰ΋Βͬͨ)5.-Λਓ͕ݟΔܗࣜͰදࣔ͢Δ 
  34. 8FC4FSWFS 8FC"QQ #SPXTFS ϦΫΤετ Ϩεϙϯε )5.- Πϯλʔωοτ΁ͷΞΫηε 8FC4FSWFS͸ωοτͷ޲͜͏ʹ͋Δ *OUFSOFU 

  35. 8FC4FSWFS 8FC"QQ #SPXTFS ϦΫΤετ Ϩεϙϯε 63- )5.- ։ൃ࣌ͷߏ੒ ୆ͷϚγϯͷதͰ։ൃɺΞΫηεՄೳͰ͢ɻ ࣗ෼ͷ1$

    
  36. 8FC4FSWFS 8FC"QQ #SPXTFS ϦΫΤετ Ϩεϙϯε 63- )5.- 3BJMTΞϓϦ ͜Ε͔Β࡞Δͷ͸͜ͷ෦෼ ࣗ෼ͷ1$

    3BJMT"QQ ϒϥ΢βͰಈ࡞ ֬ೝ͠ͳ͕Βਐ Ί·͢ɻ 
  37. Ͱ͸ɺ3BJMTΞϓϦΛ ͭͬͯ͘Έ·͠ΐ͏ 

  38. ͸͡Ίͷ 8FCΞϓϦͮ͘Γ 

  39. 3BJMTΞϓϦΛͭͬͯ͘ಈ͔ͯ͠ΈΔ 3BJMTΞϓϦΛͭ͘Δ 3BJMTΞϓϦ 8FC4FSWFS Λىಈ͢Δ ϒϥ΢β͔ΒΞΫηε͢Δ 

  40. 3BJMTΞϓϦΛͭ͘Δ SBJMTOFXTBNQMF@BQQ ུ SBJMTOFXΞϓϦ໊ Ͱ3BJMTΞϓϦΛ࡞Γ·͢ɻ 3BJMT͕ΞϓϦ໊ͷϑΥϧμΛ࡞ ΓɺͦͷதʹඞཁͳϑΝΠϧΛͨ͘ ͞Μ࡞੒͠·͢ɻը໘ʹදࣔ͞ΕΔ ͷ͸࡞੒͞ΕͨϑΝΠϧ܈Ͱ͢ɻ ͦͷޙɺඞཁͳHFNΛࣗಈͰηο

    τΞοϓ͠·͢ɻ ͪΐͬͱ͔͔࣌ؒΓ·͢ɻ ్தͰ&OUFSZPVSQBTTXPSEUP JOTUBMMUIFCVOEMFE3VCZ(FNTUP ZPVSTZTUFN ͱݴΘΕͨΒύιίϯͷύεϫʔυΛೖྗ͠ ͍ͯͩ͘͞ɻ 
  41. 8FC4FSWFSͱ3BJMTΞϓϦΛىಈͯ͠ɺϒϥ΢β͔ΒΞΫηε Մೳʹ͠·͢ɻ ىಈத͸TIFMM͔ΒίϚϯυͳͲ͸ೖྗͰ͖ͳ͍ͷͰɺඞཁͳ৔߹ ͸ผͷλʔϛφϧը໘Λ։͖·͢ɻ ऴྃ͸$USMΩʔΛԡ͠ͳ͕ΒDΩʔΛԡ͍ͯͩ͘͠͞ɻ 8JOEPXTͰ$USM DͰऴྃ͠ͳ͍৔߹ɺ$USM 1"64&Λࢼ͍ͯͩ͘͠͞ɻ ͦΕͰ΋μϝͳ৔߹͸ɺλʔϛφϧը໘Λด͍ͯͩ͘͡͞ɻ DETBNQMF@BQQ

    CVOEMFFYFDSBJMTTFSWFS 8FC4FSWFSͱ3BJMTΞϓϦΛىಈ͢Δ ‏TFSWFS͸Tͱ ུ͢͜ͱ΋ՄೳͰ͢ɻ 
  42. ͜Μͳը໘͕ग़Ε͹3BJMTΞϓϦ΁ΞΫηε੒ޭͰ͢ɻ ։ൃ͢ΔͨΊͷา໨͕౿Έग़͍ͤͯΔ͜ͱʹͳΓ·͢ɻ IUUQMPDBMIPTU ϒϥ΢β͔ΒҎԼͷ63-ʹΞΫηε͢Δ 

  43. MPDBMIPTU ಛผͳΞυϨεͰ͢ɻࣗ෼ͷϚγϯΛࢦ͠·͢ɻ IUUQMPDBMIPTU 63-ͷઆ໌  ϙʔτ൪߸Ͱ͢ɻ൪ϙʔτΛࢦ͠·͢ɻ ΞυϨε ϙʔτ ϙʔτ͸ɺಉ͡ΞυϨε಺Ͱ௨৴ઌΛಛఆ͢Δ൪߸Ͱ͢ɻ ྫ͑͹ɺΞυϨε͕Ӻͷ໊લɺϙʔτ͕ӺͷϗʔϜ˓൪ઢɺ

    ͱΠϝʔδ͢Δͱ෼͔Γ΍͍͔͢΋ɻ 
  44. 8FC4FSWFS 8FC"QQ #SPXTFS ϦΫΤετ IUUQMPDBMIPTU Ϩεϙϯε )5.- ࣗ෼ͷ1$ MPDBMIPTU CVOEMFFYFDSBJMTT

    ͖ͬ͞ͷΞΫηεͷΠϝʔδਤ TBNQMF@BQQ 
  45. ͍ͭͮͯɺ ؆୯ͳϖʔδΛ࡞ͬͯΈ·͢ɻ σϞ΍։ൃͷͨΊͷͻͳܗΛ࡞ΔͨΊͷTDBGGPME ͱ͍͏ػೳΛར༻͠·͢ɻ͜ΕΛ࢖͏ͱɺҰؾʹϒ ϩάͷΑ͏ͳػೳΛ࡞Δ͜ͱ͕Ͱ͖·͢ɻ ˞TDBGGPME͸଍৔ͱ͍͏ҙຯͰ͢ɻ ޻ࣄݱ৔Ͱ૊·ΕͯΔ͋ͷ଍৔Ͱ͢ 

  46. CVOEMFFYFDSBJMTHTDBGGPMECPPLUJUMFTUSJOHNFNPUFYU ؆୯ͳϖʔδΛͭͬͯ͘ΈΔ CVOEMFFYFDSBLFECNJHSBUF TDBGGPMEͰϖʔδΛͭ͘Δ σʔλΛ͠·͏σʔλϕʔεΛͭ͘Δ IUUQMPDBMIPTUCPPLT ϒϥ΢β͔ΒҎԼͷ63-ʹΞΫηε͢Δ ຊͷλΠτϧͱϝϞΛొ࿥Ͱ͖ΔϖʔδΛͭ͘Γ·͢ɻ CVOEMFFYFDSBJMTT ˞SBJMTTFSWFSΛ$USMDͰఀࢭ͍ͯͨ͠Βɺ·ͨىಈ͢Δ

    λʔϛφϧͰSBJMTTFSWFS͕ىಈ͍ͯ͠Δ৔߹͸ɺऴྃ͢Δ͔ɺผͷλʔ ϛφϧΛ։͍͍ͯͩ͘͞ɻTBNQMF@BQQϑΥϧμ΁Ҡಈ͓͖ͯ͠·͢ɻ ʢ͜ͷϑΥϧμͷ͜ͱΛ3BJMT3PPUͱݺͼ·͢ɻʣ  ˞H͸HFOFSBUFͷུͰ͢ɻ
  47. ͜Μͳը໘͕ग़Ε͹੒ޭͰ͢ɻ/FX#PPLϦϯΫ͔ Βొ࿥ͨ͠Γฤूͨ͠Γ࡟আͨ͠Γͯ͠Έ͍ͯͩ͘͞ɻ IUUQMPDBMIPTUCPPLT ϒϥ΢β͔ΒҎԼͷ63-ʹΞΫηε͢Δ 

  48. 3BJMT3PPUϑΥϧμ΁Ҡಈ TBNQMF@BQQϑΥϧμ΁Ҡಈ͓͖ͯ͠·͢ɻ TBNQMF@BQQϑΥϧμΛ3BJMT3PPUͱݺͼ·͢ɻ CVOEMFJOTUBMM 3BJMTΞϓϦͰ࢖͏HFNΛηοτΞοϓͯ͘͠ΕΔ͓·͡ͳ͍ɻ ಉ͡ΞϓϦΛ࿈ଓͯ͠ಈ͔͍ͯ͠Δ৔߹͸ෆཁͰ͢ɻ 8FC4FSWFSͱ3BJMTΞϓϦΛىಈ͢Δ ϒϥ΢β͔ΒΞΫηε͢Δ 3BJMTΞϓϦΛճ໨Ҏ߱ʹىಈ͢Δ৔߹ͷखॱ CVOEMFJOUBMM

    IUUQMPDBMIPTUCPPLT CVOEMFFYFDSBJMTT  ‏CVOEMFJOTUBMM͸CVOEMFͱলུ΋ՄೳͰ͢ɻ
  49. 2VFTUJPO 

  50. None
  51. ࢀߟࢿྉ

  52. BCD ࣮ߦ݁Ռ QVUTBCD ॻࣜ 3VCZίʔυ ࣮ߦ݁Ռ TIFMMίϚϯυ MT Q 

    จதͰ͸Ͱॻ͖·͢
  53. ࣗश༻3BJMTࢿྉ ಛʹڭՊॻ͸࢖͍·ͤΜ͕ɺࣗश༻ʹ͸ҎԼͷࢿྉΛ͓קΊ͠·͢ɻ 3BJMT5VUPSJBM XFC IUUQSBJMTUVUPSJBMKQ WFSTJPO  3BJMT(VJEF XFC &OHMJTI

    IUUQHVJEFTSVCZPOSBJMTPSH 3BJMTʹΑΔΞδϟΠϧ8FCΞϓϦέʔγϣϯ։ൃୈ൛ IUUQXXXBNB[PODPKQEQ վగ৽൛جૅ3VCZPO3BJMT IUUQXXXBNB[PODPKQEQ ͨͷ͍͠3VCZ IUUQXXXBNB[PODPKQEQ
  54. ߨٛࢿྉஔ͖৔ աڈͷࢿྉ͕%-Ͱ͖·͢ɻ IUUQTHJUIVCDPNJHBJHBIJUPUTVCBTIJSVCZ

  55. ࡶஊɾ࣭໰༻GBDFCPPLάϧʔϓ IUUQTXXXGBDFCPPLDPNHSPVQTIJUPUTVCBTIJSC ɾՃೖඇՃೖ͸ࣗ༝Ͱ͢ ɾՃೖඇՃೖ͸੒੷ʹؔ܎͠·ͤΜ ɾࢀՃऀҰཡ͸ެ։͞Ε·͢ ɾࢀՃऀ͸ελοϑ ߨࢣɾ5" ͱࡢ೥ɺࠓ೥ͷडߨऀͰ͢ ɾॻ͖ࠐΈ͸ࢀՃऀͷΈݟ͑·͢ ɾر๬ऀ͸ΞΫηεͯ͠ࢀՃਃ੥͍ͯͩ͘͠͞

    ɾࡶஊɺ࣭໰ɺٞ࿦ͳͲԿͰ΋ؾʹͤͣͲ͏ͧʙ ɾ࣭໰ʹ౴͑ΒΕΔਓ͸౴͍͑ͯ͋͛ͯͩ͘͞ ɾߨࢣਞ΋͓౴͑͠·͢ ɾೖͬͨΒܰࣗ͘ݾ঺հ͓Ͷ͕͍͠·͢