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

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

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

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

terminal

Terminalは、Apple社のmacOSに標準で付属しているUNIX端末エミュレータ。UNIXコマンドによってMacの操作および設定を行うことができます。

Q&A

0回答

236閲覧

Failed to install gems via Bundler Herokuへデプロイできない(Rails Tutorial 7章)

vivivi

総合スコア15

Ruby on Rails 5

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

terminal

Terminalは、Apple社のmacOSに標準で付属しているUNIX端末エミュレータ。UNIXコマンドによってMacの操作および設定を行うことができます。

0グッド

0クリップ

投稿2019/02/16 17:28

編集2019/02/18 12:56

git push heroku を行ってもHerokuへデプロイ出来ません。
Failed to install gems via Bundler.というエラーメッセージが出てしまい、
自分自身で調べて見た所多くの情報に原因はherokuではsqlite3を使えず本番とローカル環境でDBを切り分けるようGemfileの更新が必要とありましたが、
gemfileにて既に分かれているのにエラーが出てしまいます。
原因は他になにが考えられるんでしょうか?

またその他にconfig/database.ymlのproductionの部分を
production:
<<: *default
adapter: postgresql
encoding: unicode
pool: 5
という書き換えが必要という記事も拝見したためおないましたがダメでした、、、

コード

```source 'https://rubygems.org' gem 'rails', '5.1.6' gem 'bcrypt', '3.1.12' gem 'bootstrap-sass', '3.3.7' gem 'puma', '3.9.1' gem 'sass-rails', '5.0.6' gem 'uglifier', '3.2.0' gem 'coffee-rails', '4.2.2' gem 'jquery-rails', '4.3.1' gem 'turbolinks', '5.0.1' gem 'jbuilder', '2.7.0' group :development, :test do gem 'sqlite3', '1.3.13' gem 'byebug', '9.0.6', platform: :mri end group :production do gem 'pg', '1.1.4' end group :development do gem 'web-console', '3.5.1' gem 'listen', '3.1.5' gem 'spring', '2.0.2' gem 'spring-watcher-listen', '2.0.1' end group :test do gem 'rails-controller-testing', '1.0.2' gem 'minitest', '5.10.3' gem 'minitest-reporters', '1.1.14' gem 'guard', '2.13.0' gem 'guard-minitest', '2.4.4' end # Windows環境ではtzinfo-dataというgemを含める必要があります gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

mi:~/environment/sample_app

1Counting objects: 1314, done. 2Compressing objects: 100% (1282/1282), done. 3Writing objects: 100% (1314/1314), 5.78 MiB | 1.59 MiB/s, done. 4Total 1314 (delta 1008), reused 0 (delta 0) 5remote: Compressing source files... done. 6remote: Building source: 7remote: 8remote: -----> Ruby app detected 9remote: -----> Compiling Ruby/Rails 10remote: -----> Using Ruby version: ruby-2.4.5 11remote: -----> Installing dependencies using bundler 2.0.1 12remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment 13remote: Activating bundler (< 2) failed: 14remote: Could not find 'bundler' (< 2) - did find: [bundler-2.0.1] 15remote: Checked in 'GEM_PATH=vendor/bundle/ruby/2.4.0', execute `gem env` for more information 16remote: 17remote: To install the version of bundler this project requires, run `gem install bundler -v '< 2'` 18remote: Bundler Output: Activating bundler (< 2) failed: 19remote: Could not find 'bundler' (< 2) - did find: [bundler-2.0.1] 20remote: Checked in 'GEM_PATH=vendor/bundle/ruby/2.4.0', execute `gem env` for more information 21remote: 22remote: To install the version of bundler this project requires, run `gem install bundler -v '< 2'` 23remote: 24remote: ! 25remote: ! Failed to install gems via Bundler. 26remote: ! 27remote: ! Push rejected, failed to compile Ruby app. 28remote: 29remote: ! Push failed 30remote: Verifying deploy... 31remote: 32remote: ! Push rejected to morning-headland-86878. 33remote: 34To https://git.heroku.com/morning-headland-86878.git 35 ! [remote rejected] master -> master (pre-receive hook declined) 36error: failed to push some refs to 'https://git.heroku.com/morning-headland-86878.git' 37コード

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

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

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

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

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

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

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

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

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問