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

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

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

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Q&A

0回答

2132閲覧

herokuにpushしたいがFailed to install gems via Bundlerエラーが起き失敗する

ketyan

総合スコア22

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

0グッド

0クリップ

投稿2020/01/21 12:54

編集2020/01/21 13:40

###現状
作成したアプリをherokuにpushするためにこのページを元に作業を進めていたところ、
git push heroku masterを実行した時にタイトルのエラーが起きました。

###ログ

remote: Compressing source files... done. remote: Building source: remote: 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: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-2.6.3 remote: -----> Vendoring libpq 5.12.1 remote: -----> Removing BUNDLED WITH version in the Gemfile.lock remote: -----> Installing dependencies using bundler 1.17.3 remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment remote: You are trying to install in deployment mode after changing remote: your Gemfile. Run `bundle install` elsewhere and add the remote: updated Gemfile.lock to version control. remote: remote: The dependencies in your gemfile changed remote: remote: You have added to the Gemfile: remote: * sqlite3 (~> 1.3.6) remote: remote: You have deleted from the Gemfile: remote: * sqlite3 remote: Bundler Output: You are trying to install in deployment mode after changing remote: your Gemfile. Run `bundle install` elsewhere and add the remote: updated Gemfile.lock to version control. remote: remote: The dependencies in your gemfile changed remote: remote: You have added to the Gemfile: remote: * sqlite3 (~> 1.3.6) remote: remote: You have deleted from the Gemfile: remote: * sqlite3 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 kakeibo009.

###試したこと
Failed to install gems via Bundler.の箇所からbundlerに原因が
あることは分かるのですが、解決法が見つかりませんでした。
buildpackの方に問題があるのでしょうか。
###補足
GemfileとGemfile.lockのBUNDLED WITHは両方とも2.0.1
Bundlerのバージョンは 2.0.1でした

database.ymlはこの状態です。

DatabaseYML

1# SQLite version 3.x 2# gem install sqlite3 3# 4# Ensure the SQLite 3 gem is defined in your Gemfile 5# gem 'sqlite3' 6# 7default: &default 8 adapter: sqlite3 9 pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> 10 timeout: 5000 11 12development: 13 <<: *default 14 database: db/development.sqlite3 15 16# Warning: The database defined as "test" will be erased and 17# re-generated from your development database when you run "rake". 18# Do not set this db to the same as development or production. 19test: 20 <<: *default 21 database: db/test.sqlite3 22 23production: 24 <<: *default 25 adapter: postgresql 26 encoding: unicode 27 pool: 5 28 29

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

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

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

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

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

退会済みユーザー

退会済みユーザー

2020/01/21 13:19

sqlite3 を使用したいならば heroku で 解決策はないです。
ketyan

2020/01/21 13:37

herokuで扱うのがpostgresqlだということを忘れていました。 ご指摘ありがとうございます。 herokuへのpushの時に初めて起きたエラーなのですが、 原因特定のために見るべきファイルはdatabase.yml以外に ありますでしょうか
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

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

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

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問