{"id":7352,"date":"2019-11-23T12:47:00","date_gmt":"2019-11-23T03:47:00","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=7352"},"modified":"2023-05-27T23:00:16","modified_gmt":"2023-05-27T14:00:16","slug":"%e3%80%90ruby-on-rails%e3%80%91gemfile%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=7352","title":{"rendered":"\u3010Ruby on Rails\u3011Bundler\u3001Gemfile\u306b\u3064\u3044\u3066"},"content":{"rendered":"<h2>Bundler\u3068\u306f\uff1f<\/h2>\n<p>Ruby\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3042\u308bRubyGems\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306e\u30c4\u30fc\u30eb\u3067\u3001\u958b\u767a\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3054\u3068\u306bRubyGems\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u7ba1\u7406\u3057\u3066\u304f\u308c\u307e\u3059\u3002\u3053\u308c\u81ea\u4f53\u3082RubyGems\u3068\u3057\u3066\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>Bundler\u304c\u3084\u3063\u3066\u304f\u308c\u308b\u3053\u3068<\/h3>\n<ul>\n<li>Rails\u7b49\u306eRuby\u958b\u767a\u306b\u5fc5\u8981\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u307e\u3068\u3081\u3066\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3084\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/li>\n<li>1\u3064\u306e\u30de\u30b7\u30f3\u306b\u3001\u540c\u3058RubyGems\u304c\u8907\u6570\u30d0\u30fc\u30b8\u30e7\u30f3\u4f7f\u308f\u308c\u3066\u3044\u305f\u5834\u5408\u306f\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308bRubyGems\u3092\u9069\u5207\u306b\u5207\u308a\u66ff\u3048\u3066\u304f\u308c\u308b\u3002<\/li>\n<\/ul>\n<h3>Bundler\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5<\/h3>\n<p>\u300cBundler\u300d\u81ea\u4f53\u304cRubyGems\u306a\u306e\u3067\u3001\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3067\u6700\u521d\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">gem install bundler<\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-4278\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/06\/\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb.png\" alt=\"\" width=\"486\" height=\"134\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/06\/\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb.png 486w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/06\/\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb-300x83.png 300w\" sizes=\"(max-width: 486px) 100vw, 486px\" \/><\/p>\n<p>\u4e0a\u8a18\u306f\u3001Windows7\u3078rubyinstaller\u3092\u4f7f\u3063\u305fBundler\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u30ad\u30e3\u30d7\u30c1\u30e3\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>Bundler\u306e\u52d5\u4f5c\u3084\u30b3\u30de\u30f3\u30c9\u7b49<\/h3>\n<h4>bundle init<\/h4>\n<p>Bundler\u3067gem\u3092\u7ba1\u7406\u3057\u305f\u3044\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068Gemfile\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<h4>bundle install<\/h4>\n<p>Gemfile\u306b\u3066\u8a18\u8ff0\u3057\u305fGem\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002\u305d\u306e\u969b\u306b<span style=\"color: #ff0000;\"><strong>\u300cGemfile.lock\u300d<\/strong><\/span>\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002\u3053\u3053\u306b\u306f\u306b\u8a18\u9332\u3055\u308c\u3066bundler\u3092\u4ecb\u3057\u3066\u540c\u3058\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306e\u5b9f\u884c\u304c\u4fdd\u8a3c\u3055\u308c\u307e\u3059\u3002\u4eee\u306b\u5229\u7528\u3057\u3066\u3044\u308bgem\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u30a2\u30c3\u30d7\u3057\u3066\u6700\u65b0\u7248\u304c\u65b0\u305f\u306b\u914d\u4fe1\u3055\u308c\u3066\u3044\u308b\u3068\u3057\u3066\u3082<span style=\"color: #ff0000;\"><strong>bundler\u306f\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u30ed\u30c3\u30af\u3059\u308b\u305f\u3081\u81ea\u52d5\u7684\u306b\u74b0\u5883\u306b\u53cd\u6620\u3055\u308c\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/strong><\/span><\/p>\n<p>\u306a\u304a\u3001\u3042\u308bGem\u306b\u4f9d\u5b58\u95a2\u4fc2\u306e\u3042\u308b\u5225\u306eGem\u3082\u5408\u308f\u305b\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h5>\u30aa\u30d7\u30b7\u30e7\u30f3<\/h5>\n<h6>-j4<\/h6>\n<p>jobs=4\u306e\u7565\u3067\u3001gem\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u4e26\u5217\u306b\u304a\u3053\u306a\u3063\u3066\u304f\u308c\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4>bundle update<\/h4>\n<p>gem\u30d5\u30a1\u30a4\u30eb\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u6700\u65b0\u7248\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u307e\u3059\u3002\uff08\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u306a\u3044\u9650\u308a\u306fGemfile.lock\u306b\u3066\u30d0\u30fc\u30b8\u30e7\u30f3\u56fa\u5b9a\u3055\u308c\u307e\u3059\u3002\uff09bundle update\u3057\u305f\u5f8c\u306f\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u3069\u306e\u3088\u3046\u306b\u4e0a\u304c\u3063\u305f\u306e\u304b\u306f\u5fc5\u305a\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>Gemfile\u3068\u306f\uff1f<\/h2>\n<p>Bundler\u304cRails\u30a2\u30d7\u30ea\u3067\u4f7f\u3046RubyGems\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306e\u3082\u306e\u3067Rails\u306e\u30eb\u30fc\u30c8\u30d5\u30a9\u30eb\u30c0\u306b\u5b58\u5728\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><span style=\"color: #ff0000;\"><strong>Rails\u3067\u4f7f\u3046gem\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002(\u306a\u304a\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u6307\u5b9a\u3092\u7701\u7565\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u7701\u7565\u3057\u305f\u5834\u5408\u306f\u6700\u65b0\u7248\u306egem\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\uff09<\/strong><\/span><\/p>\n<h3>Gemfile\u306e\u66f8\u304d\u65b9<\/h3>\n<pre class=\"lang:default decode:true\">gem 'gem\u540d','\u30d0\u30fc\u30b8\u30e7\u30f3\u6307\u5b9a'<\/pre>\n<h3>\u66f4\u65b0\u65b9\u6cd5<\/h3>\n<p>\u307e\u305a\u306f\u3001Gemfile\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068Gemfile\u306e\u8a18\u8ff0\u306b\u5f93\u3063\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u306egem\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">bundle update gem\u540d<\/pre>\n<p>\u307e\u305f\u3001gem\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u793a\u3057\u305f<span style=\"color: #ff0000;\"><strong>Gemfile.lock<\/strong><\/span>\u30d5\u30a1\u30a4\u30eb\u3082\u66f4\u65b0\u3055\u308c\u307e\u3059\u3002\uff08\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3082Gemfile\u540c\u69d8\u306bRails\u306e\u30eb\u30fc\u30c8\u76f4\u4e0b\u306b\u3042\u308a\u307e\u3059\u3002\uff09<\/p>\n<h3>Gemfile.lock\u306b\u3064\u3044\u3066<\/h3>\n<p>\u5225\u306ePC\u3084\u30b5\u30fc\u30d0\u30fc\u3067\u540c\u3058\u30d0\u30fc\u30b8\u30e7\u30f3\u306eGem\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3044\u5834\u5408\u306b\u4f7f\u3046\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002\u3042\u308b\u74b0\u5883\u3067\u8a2d\u5b9a\u3057\u305fGemfile.lock\u3092\u5225\u306ePC\u306b\u305d\u306e\u307e\u307e\u6301\u3063\u3066\u3044\u304f\u3053\u3068\u306b\u3088\u3063\u3066<span style=\"color: #ff0000;\"><strong>\u540c\u3058\u30d0\u30fc\u30b8\u30e7\u30f3\u306eGem\u3092\u5171\u6709\u3057\u3066\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b<\/strong><\/span>\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4>\u4f7f\u7528\u4f8b<\/h4>\n<ul>\n<li>Rails\u30a2\u30d7\u30ea\u3092\u958b\u767a\u7528PC\u3068\u516c\u958b\u7528\u30b5\u30fc\u30d0\u30fc\u3067\u540c\u3058\u30d0\u30fc\u30b8\u30e7\u30f3\u306eGem\u3092\u6d3b\u7528\u3057\u3066\u52d5\u304b\u3059\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"Bundler\u3068\u306f\uff1f Ruby\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3042\u308bRubyGems\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306e\u30c4\u30fc\u30eb\u3067\u3001\u958b\u767a\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3054\u3068\u306bRubyGems\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u7ba1\u7406\u3057\u3066\u304f\u308c\u307e\u3059\u3002\u3053\u308c\u81ea\u4f53\u3082RubyGems\u3068\u3057\u3066\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\u3002 Bundl [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[36],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/7352"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7352"}],"version-history":[{"count":11,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/7352\/revisions"}],"predecessor-version":[{"id":20545,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/7352\/revisions\/20545"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7352"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7352"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7352"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}