質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Q&A

0回答

653閲覧

【rails】heroku pushエラー

ryouya

総合スコア14

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

1グッド

0クリップ

投稿2020/04/22 07:22

お世話になっております。
下記のエラーについて知見がある方がいらっしゃいましたらご教示お願いします。

#起きたエラー

$ git push heroku master Enumerating objects: 28385, done. Counting objects: 100% (28385/28385), done. : (省略) : remote: ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used. remote: Detected buildpacks: Ruby,Node.js remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order remote: -----> Ruby app detected remote: -----> Installing bundler 2.0.2 remote: -----> Removing BUNDLED WITH version in the Gemfile.lock remote: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-2.6.6 remote: -----> Installing dependencies using bundler 2.0.2 remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment remote: Some gems seem to be missing from your vendor/cache directory. remote: Could not find pg-0.20.0 in any of the sources remote: Bundler Output: Some gems seem to be missing from your vendor/cache directory. remote: Could not find pg-0.20.0 in any of the sources remote: remote: ! remote: ! Failed to install gems via Bundler. remote: ! remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to secure-oasis-29130.

Herokuにpushした際に上記のエラーが発生しました。

#試したこと1
bundle install --without productionを実行しましたが、エラーは解消されませんでした。

#試したこと2
Installing bundler 2.0.2とエラー文に記載されていたため、
Gemfile.lockとローカルのbundlerのバージョンを2.0.2にしましたがエラーは解消されませんでした。

#関連ファイル

■Gemfile

# frozen_string_literal: true source 'https://rubygems.org' gem 'bcrypt', '3.1.12' gem 'bootstrap-sass', '3.3.7' gem 'bootstrap-will_paginate', '1.0.0' gem 'carrierwave', '~> 1.3', '>= 1.3.1' gem 'coffee-rails', '4.2.2' gem 'faker', '1.7.3' gem 'jbuilder', '2.7.0' gem 'jquery-rails', '4.3.1' gem 'jquery-ui-rails' gem 'pry-rails' gem 'puma', '3.9.1' gem 'rails', '5.1.6' gem 'ransack' gem 'rubocop', require: false gem 'rubocop-rails', require: false gem 'sass-rails', '5.0.6' gem 'turbolinks', '5.0.1' gem 'uglifier', '3.2.0' gem 'will_paginate', '3.1.6' group :development, :test do # gem 'sqlite3', '1.3.13' gem 'byebug', '9.0.6', platform: :mri gem 'mysql2' end group :development do gem 'listen', '3.1.5' gem 'spring', '2.0.2' gem 'spring-watcher-listen', '2.0.1' gem 'web-console', '3.5.1' end group :test do gem 'guard', '2.13.0' gem 'guard-minitest', '2.4.4' gem 'minitest', '5.10.3' gem 'minitest-reporters', '1.1.14' gem 'rails-controller-testing', '1.0.2' end group :production do gem 'pg', '0.20.0' end group :production, :staging do gem 'unicorn', '5.4.1' end

■Gemfile.lock

GEM remote: https://rubygems.org/ specs: : (省略) : websocket-extensions (0.1.4) will_paginate (3.1.6) PLATFORMS ruby DEPENDENCIES bcrypt (= 3.1.12) bootstrap-sass (= 3.3.7) bootstrap-will_paginate (= 1.0.0) byebug (= 9.0.6) carrierwave (~> 1.3, >= 1.3.1) coffee-rails (= 4.2.2) faker (= 1.7.3) guard (= 2.13.0) guard-minitest (= 2.4.4) jbuilder (= 2.7.0) jquery-rails (= 4.3.1) jquery-ui-rails listen (= 3.1.5) minitest (= 5.10.3) minitest-reporters (= 1.1.14) mysql2 pg (= 0.20.0) pry-rails puma (= 3.9.1) rails (= 5.1.6) rails-controller-testing (= 1.0.2) ransack rubocop rubocop-rails sass-rails (= 5.0.6) spring (= 2.0.2) spring-watcher-listen (= 2.0.1) turbolinks (= 5.0.1) uglifier (= 3.2.0) unicorn (= 5.4.1) web-console (= 3.5.1) will_paginate (= 3.1.6) BUNDLED WITH 2.0.2

■環境
ruby 2.5.1
Rails 5.1.6

退会済みユーザー👍を押しています

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問