{"id":6567,"date":"2021-03-30T09:47:30","date_gmt":"2021-03-30T00:47:30","guid":{"rendered":"https:\/\/yumishin.com\/?p=6567"},"modified":"2021-03-30T11:15:53","modified_gmt":"2021-03-30T02:15:53","slug":"heroku-push-error-2","status":"publish","type":"post","link":"https:\/\/yumishin.com\/?p=6567","title":{"rendered":"Heroku\u3078Push\u3059\u308b\u969b\u306b\u300cFailed to install gems via Bundler.\u300d\u304c\u51fa\u305f\u6642\u306e\u5bfe\u51e6\u6cd5Part2"},"content":{"rendered":"<p>\u307e\u305f\u3057\u3066\u3082\u3053\u3093\u306a\u306b\u30cf\u30de\u308b\u3068\u306f\u601d\u3044\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u4eca\u56de\u306fHeroku\u3078Push\u3059\u308b\u969b\u306b\u300cFailed to install gems via Bundler.\u300d\u304c\u51fa\u305f\u6642\u306e\u5bfe\u51e6\u6cd5Part2\u3068\u3057\u3066\u89e3\u6c7a\u7b56\u3092\u307e\u3068\u3081\u307e\u3059\u3002<\/p>\n<p>\u203b\u5148\u306b\u4ee5\u4e0b\u306e\u8a18\u4e8b\u306e\u5185\u5bb9\u3092\u78ba\u8a8d\u304f\u3060\u3055\u3044\u3002\u305d\u308c\u3067\u3082\u89e3\u6c7a\u3057\u306a\u3044\u5834\u5408\u306f\u4eca\u56de\u306e\u8a18\u4e8b\u306e\u5185\u5bb9\u3092\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><a class=\"linkto table\" href=\"https:\/\/yumishin.com\/?p=6317\"> <span class=\"tbcell tbimg\"><img loading=\"lazy\" decoding=\"async\" width=\"160\" height=\"160\" src=\"https:\/\/yumishin.com\/wp-content\/uploads\/2021\/01\/Atom-2-160x160.jpg\" class=\"attachment-thumb-160 size-thumb-160 wp-post-image\" alt=\"\"><\/span> <span class=\"tbcell tbtext\"> Heroku\u3078Push\u3059\u308b\u969b\u306b\u300cFailed to install gems via Bundler.\u300d\u304c\u51fa\u305f\u6642\u306e\u5bfe\u51e6\u6cd5 <\/span> <\/a><\/p>\n<h2 id=\"i-0\">\u7d50\u8ad6<\/h2>\n<p><span style=\"color: #ff0000;\"><code>bundle lock \u2013add-platform x86_64-linux<\/code>\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u305f\u3002<\/span><\/p>\n<p>\u8a00\u3044\u65b9\u3092\u304b\u3048\u308b\u3068\u3001\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u305fbundler\u304c\u81ea\u5206\u306ePC\u306eOS\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u672a\u5bfe\u5fdc\u3060\u3063\u305f\u3002\u306a\u306e\u3067\u300c\u79c1\u306ePC\u306eOS\u3082\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u305fbundler\u306b\u5bfe\u5fdc\u3055\u305b\u3066\u306d\u300d\u3059\u308b\u305f\u3081\u306b\u3001\u4e0a\u8ff0\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u305f\u3002<\/p>\n<p>\u203bRuby 3.0.0\u3001Rails 6.1.3\u30022021\/03\/20\u6642\u70b9\u3067\u6700\u65b0\u7248\u306eRuby\u3068Rails\u3092\u4f7f\u7528\u3002<\/p>\n<h2 id=\"i-1\">\u89e3\u6c7a\u624b\u9806<\/h2>\n<h3 id=\"i-2\">\u30a8\u30e9\u30fc\u906d\u9047<\/h3>\n<p>\u65b0\u3057\u3044\u30a2\u30d7\u30ea\u3092Heroku\u306b\u30a2\u30c3\u30d7\u3057\u3088\u3046\u3068\u601d\u3044\u3001git push heroku master\u3092\u5b9f\u884c\u3002\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3002<\/p>\n<div class=\"pre_tag\"><span><i class=\"fa fa-code\"><\/i> \u30b3\u30fc\u30c9<\/span><\/p>\n<pre><code>Enumerating objects: 10, done.\nCounting objects: 100% (10\/10), done.\nDelta compression using up to 8 threads\nCompressing objects: 100% (5\/5), done.\nWriting objects: 100% (5\/5), 1.99 KiB | 1.99 MiB\/s, done.\nTotal 5 (delta 2), reused 0 (delta 0), pack-reused 0\nremote: Compressing source files... done.\nremote: Building source:\nremote:&nbsp;\nremote: -----&gt; Building on the Heroku-20 stack\nremote: -----&gt; Determining which buildpack to use for this app\nremote:&nbsp; ! &nbsp; &nbsp; Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.\nremote: Detected buildpacks: Ruby,Node.js\nremote: See https:\/\/devcenter.heroku.com\/articles\/buildpacks#buildpack-detect-order\nremote: -----&gt; Ruby app detected\nremote: -----&gt; Installing bundler 2.2.11\nremote: -----&gt; Removing BUNDLED WITH version in the Gemfile.lock\nremote: -----&gt; Compiling Ruby\/Rails\nremote: -----&gt; Using Ruby version: ruby-3.0.0\nremote: -----&gt; Installing dependencies using bundler 2.2.11\nremote:&nbsp; &nbsp; &nbsp; &nbsp; Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor\/bundle BUNDLE_BIN=vendor\/bundle\/bin BUNDLE_DEPLOYMENT=1 bundle install -j4\nremote:&nbsp; &nbsp; &nbsp; &nbsp; Your bundle only supports platforms [\"x86_64-darwin-20\"] but your local platform\nremote:&nbsp; &nbsp; &nbsp; &nbsp; is x86_64-linux. Add the current platform to the lockfile with `bundle lock\nremote:&nbsp; &nbsp; &nbsp; &nbsp; --add-platform x86_64-linux` and try again.\nremote:&nbsp; &nbsp; &nbsp; &nbsp; Bundler Output: Your bundle only supports platforms [\"x86_64-darwin-20\"] but your local platform\nremote:&nbsp; &nbsp; &nbsp; &nbsp; is x86_64-linux. Add the current platform to the lockfile with `bundle lock\nremote:&nbsp; &nbsp; &nbsp; &nbsp; --add-platform x86_64-linux` and try again.\nremote:&nbsp;\nremote:&nbsp; !\nremote:&nbsp; ! &nbsp; &nbsp; Failed to install gems via Bundler.\nremote:&nbsp; !\nremote:&nbsp; ! &nbsp; &nbsp; Push rejected, failed to compile Ruby app.\nremote:&nbsp;\nremote:&nbsp; ! &nbsp; &nbsp; Push failed\nremote:&nbsp; !\nremote:&nbsp; ! ## Warning - The same version of this code has already been built: 628ef348416c40b736a444efa2a48fc073369937\nremote:&nbsp; !\nremote:&nbsp; ! We have detected that you have triggered a build from source code with version 628ef348416c40b736a444efa2a48fc073369937\nremote:&nbsp; ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.\nremote:&nbsp; !\nremote:&nbsp; ! If you are developing on a branch and deploying via git you must run:\nremote:&nbsp; !\nremote:&nbsp; ! &nbsp; &nbsp; git push heroku :main\nremote:&nbsp; !\nremote:&nbsp; ! This article goes into details on the behavior:\nremote:&nbsp; ! &nbsp; https:\/\/devcenter.heroku.com\/articles\/duplicate-build-version\nremote:&nbsp;\nremote: Verifying deploy...\nremote:&nbsp;\nremote: ! Push rejected to pure-mountain-31710.\nremote:&nbsp;\nTo https:\/\/git.heroku.com\/pure-mountain-31710.git\n&nbsp;! [remote rejected] master -&gt; master (pre-receive hook declined)\nerror: failed to push some refs to 'https:\/\/git.heroku.com\/pure-mountain-31710.git'<\/code><\/pre>\n<\/div>\n<h3 id=\"i-3\">\u8abf\u3079\u305f\u65b9\u6cd5\u304c\u3046\u307e\u304f\u3044\u304b\u306a\u3044<\/h3>\n<p>\u307e\u305a\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u306b\u3057\u305f\u304c\u3063\u3066\u30ed\u30fc\u30ab\u30eb\u3068Heroku\u306ebundler\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u5408\u308f\u305b\u3066\u307f\u308b\u3002<\/p>\n<p><a class=\"linkto table\" href=\"https:\/\/yumishin.com\/?p=6317\"> <span class=\"tbcell tbimg\"><img loading=\"lazy\" decoding=\"async\" width=\"160\" height=\"160\" src=\"https:\/\/yumishin.com\/wp-content\/uploads\/2021\/01\/Atom-2-160x160.jpg\" class=\"attachment-thumb-160 size-thumb-160 wp-post-image\" alt=\"\"><\/span> <span class=\"tbcell tbtext\"> Heroku\u3078Push\u3059\u308b\u969b\u306b\u300cFailed to install gems via Bundler.\u300d\u304c\u51fa\u305f\u6642\u306e\u5bfe\u51e6\u6cd5 <\/span> <\/a><\/p>\n<p>\u305d\u306e\u5f8cHeroku\u306bpush\u3059\u308b\u3082\u5148\u307b\u3069\u3068\u540c\u69d8\u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3002<\/p>\n<p><code>git push heroku (\u30d6\u30e9\u30f3\u30c1\u540d):main<\/code>\u3067\u89e3\u6c7a\u3059\u308b\u304b\u3082\u3068\u3044\u3063\u305f\u8a18\u8ff0\u304c\u30a8\u30e9\u30fc\u6587\u306b\u3042\u308b\u306e\u3067\u8a66\u3057\u3066\u307f\u308b\u3002\u3057\u304b\u3057\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u3002<\/p>\n<p>\u7d50\u5c40\u3001\u4e0a\u8ff0\u306e\u8a18\u4e8b\u306e\u901a\u308a\u306b\u3084\u308c\u3070Bundler\u306e\u554f\u984c\u306f\u89e3\u6c7a\u3057\u3066\u3044\u305f\u3053\u3068\u304c\u3001\u5f8c\u304b\u3089\u308f\u304b\u3063\u305f\u3002\u554f\u984c\u306f\u5225\u3067\u767a\u751f\u3057\u3066\u3044\u305f\u3002<\/p>\n<h3 id=\"i-4\">\u89e3\u6c7a\u624b\u9806<\/h3>\n<p>\u4f55\u304c\u554f\u984c\u306a\u3093\u3060\u308d\u3046\u306a\u30fc\u3068\u601d\u3063\u3066\u3001\u3088\u304f\u3088\u304f\u30a8\u30e9\u30fc\u3092\u306a\u304c\u3081\u3066\u307f\u305f\u3002\u3059\u308b\u3068\u8d64\u6587\u5b57\u3067\u3082Warning\u3067\u3082\u306a\u3044\u3068\u3053\u308d\u3067\u3001\u4ee5\u4e0b\u306e\u30a2\u30c9\u30d0\u30a4\u30b9\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u305f\u3002<\/p>\n<div class=\"pre_tag\"><span><i class=\"fa fa-code\"><\/i> \u30b3\u30fc\u30c9<\/span><\/p>\n<pre><code>\u30fb\u30fb\u30fb\u7701\u7565\u30fb\u30fb\u30fb\nremote:&nbsp; &nbsp; &nbsp; &nbsp; Your bundle only supports platforms [\"x86_64-darwin-20\"] but your local platform\nremote:&nbsp; &nbsp; &nbsp; &nbsp; is x86_64-linux. Add the current platform to the lockfile with `bundle lock\nremote:&nbsp; &nbsp; &nbsp; &nbsp; --add-platform x86_64-linux` and try again.\n\u30fb\u30fb\u30fb\u7701\u7565\u30fb\u30fb\u30fb<\/code><\/pre>\n<\/div>\n<p>\u4f55\u3092\u3044\u3063\u3066\u3044\u308b\u304b\u3092\u7c21\u5358\u306b\u307e\u3068\u3081\u308b\u3068\u4ee5\u4e0b\u306e\u901a\u308a\u3060\u3063\u305f\u3002<\/p>\n<p>\u300c\u3042\u306a\u305f\u306ebundler\u3067\u306f\u3001\u3042\u306a\u305f\u306ePC\u306eOS\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u307e\u305b\u3093\u3002\u3042\u306a\u305f\u306ePC\u3082\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u8a2d\u5b9a\u3092\u3057\u3066\u3001\u518d\u5ea6\u3084\u308a\u76f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u300d<\/p>\n<p>\u3053\u308c\u304b\u3082\u3068\u601d\u3063\u3066\u3001\u4ee5\u4e0b\u306e\u624b\u9806\u3092\u5b9f\u884c\u3002<\/p>\n<ol>\n<li><span style=\"color: #ff0000;\"><code>\uff05 bundle lock \u2013add-platform x86_64-linux<\/code><\/span>\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c<\/li>\n<li>Gemfile.lock\u306e\u8a18\u8ff0\u304c\u8ffd\u52a0\u3055\u308c\u308b\u306e\u3067\u3001\u305d\u306e\u5909\u66f4\u3092\u30ea\u30e2\u30fc\u30c8\u306bpush<\/li>\n<li>Heroku\u3078\u306e\u30d7\u30c3\u30b7\u30e5\u3092\u518d\u5ea6\u30c8\u30e9\u30a4<\/li>\n<\/ol>\n<p>\u4ee5\u4e0b\u5b9f\u969b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002<\/p>\n<div class=\"pre_tag\"><span><i class=\"fa fa-code\"><\/i> \u30b3\u30fc\u30c9<\/span><\/p>\n<pre><code><span style=\"color: #ff0000;\">\uff05 bundle lock --add-platform x86_64-linux #\u8a00\u308f\u308c\u305f\u901a\u308a\u306b\u5b9f\u884c<\/span>\nFetching gem metadata from https:\/\/rubygems.org\/............\nResolving dependencies...\nWriting lockfile to \/Users\/shinji\/environment\/holdem-qa\/Gemfile.lock\n<span style=\"color: #ff0000;\">\uff05 git status #git status\u306e\u78ba\u8a8d<\/span>\nOn branch master\nYour branch is up to date with 'origin\/master'.\nChanges not staged for commit:\n&nbsp; (use \"git add ...\" to update what will be committed)\n&nbsp; (use \"git restore ...\" to discard changes in working directory)\nmodified: &nbsp; Gemfile.lock\u3000<span style=\"color: #ff0000;\">#Gemfile.lock\u306eplatform\u306e\u90e8\u5206\u306b\u81ea\u5206\u306ePC\u306eOS\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u8ffd\u52a0\u3067\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\uff01\n<\/span>no changes added to commit (use \"git add\" and\/or \"git commit -a\")\n <span style=\"color: #ff0000;\">% git add -A\n % git commit -m \"x86_64-linux\u306e\u8a18\u8ff0\u3092Gemfile.lock\u306b\u8ffd\u52a0\u30fb\u66f4\u65b0\" #git add &amp; commit\u3092\u5fd8\u308c\u305a\u306b<\/span>\n[master fac3465] x86_64-linux\u306e\u8a18\u8ff0\u3092Gemfile.lock\u306b\u8ffd\u52a0\u30fb\u66f4\u65b0\n&nbsp;1 file changed, 3 insertions(+)\n<span style=\"color: #ff0000;\">% git push heroku master<\/span>\nEnumerating objects: 13, done.\nCounting objects: 100% (13\/13), done.\nDelta compression using up to 8 threads\nCompressing objects: 100% (8\/8), done.\nWriting objects: 100% (8\/8), 2.32 KiB | 2.32 MiB\/s, done.\nTotal 8 (delta 4), reused 0 (delta 0), pack-reused 0\nremote: Compressing source files... done.\nremote: Building source:\n\u30fb\u30fb\u30fb\u7701\u7565\u30fb\u30fb\u30fb&nbsp;\nremote: -----&gt; Compressing...\nremote:&nbsp; &nbsp; &nbsp; &nbsp; Done: 78.7M\nremote: -----&gt; Launching...\nremote:&nbsp; &nbsp; &nbsp; &nbsp; Released v6\nremote:&nbsp; &nbsp; &nbsp; &nbsp; https:\/\/pure-mountain-31710.herokuapp.com\/ deployed to Heroku\nremote:&nbsp;\nremote: Verifying deploy... done.\nTo https:\/\/git.heroku.com\/pure-mountain-31710.git\n&nbsp;* [new branch]&nbsp; &nbsp; &nbsp; master -&gt; master\n<span style=\"color: #ff0000;\">\uff05 heroku open #\u7121\u4e8b\u306b\u30c7\u30d7\u30ed\u30a4\u5b8c\u4e86\uff01<\/span><\/code><\/pre>\n<\/div>\n<p class=\"p1\">\u307e\u308b2\u65e5\u304b\u304b\u308a\u307e\u3057\u305f\u3002\u82e6\u3057\u304b\u3063\u305f\u3067\u3059\u304c\u3001\u89e3\u6c7a\u3057\u3066\u3088\u304b\u3063\u305f\u3067\u3059\u3002\u3067\u306f\u307e\u305f\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u307e\u305f\u3057\u3066\u3082\u3053\u3093\u306a\u306b\u30cf\u30de\u308b\u3068\u306f\u601d\u3044\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u4eca\u56de\u306fHeroku\u3078Push\u3059\u308b\u969b\u306b\u300cFailed to install gems via Bundler.\u300d\u304c\u51fa\u305f\u6642\u306e\u5bfe\u51e6\u6cd5Part2\u3068\u3057\u3066\u89e3\u6c7a\u7b56\u3092\u307e\u3068\u3081\u307e\u3059\u3002 \u203b\u5148\u306b\u4ee5\u4e0b &#8230; <\/p>\n","protected":false},"author":1,"featured_media":6328,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[272],"tags":[],"class_list":{"0":"post-6567","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-programing","8":"entry"},"_links":{"self":[{"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/posts\/6567","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6567"}],"version-history":[{"count":3,"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/posts\/6567\/revisions"}],"predecessor-version":[{"id":6716,"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/posts\/6567\/revisions\/6716"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/media\/6328"}],"wp:attachment":[{"href":"https:\/\/yumishin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6567"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}