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

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

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

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

Heroku

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

BitBucket

BitBucketは無料のリポジトリ管理ホスティングサービスです。 MercurialとGitのVCSに対応しています。プライベートリポジトリを、制限なく作成することが可能です。

Q&A

解決済

1回答

352閲覧

ruby on rails チュートリアル 2章 herokuにpushでエラーが出ます。

koki0125

総合スコア24

Ruby on Rails 5

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

Heroku

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

BitBucket

BitBucketは無料のリポジトリ管理ホスティングサービスです。 MercurialとGitのVCSに対応しています。プライベートリポジトリを、制限なく作成することが可能です。

0グッド

0クリップ

投稿2018/06/09 08:52

プログラミング歴 1ヶ月の初心者です。

2章の下記で詰まりました。
herokuにpushできません。

$ git commit -am "Add hello"
$ heroku create
$ git push heroku master

やったこと
試行錯誤してよくわからなくなったので4〜5回、bitbucketとherokuのリポジトリを削除してやり直しました。完全に消えたかわかりません。まだどこかにデータが残っているのかもしれません。

どなたかherokuにpushできる手順、エラーの原因を教えていただけませんでしょうか。よろしくお願いいたします。

イメージ説明
イメージ説明

以下、コマンドラインです。文字数オーバーしたので「・・・」は問題なさそうだったので省いています。

ruby

1ec2-user:~/environment/toy_app (master) $ git push heroku master 2Counting objects: 84, done. 3Compressing objects: 100% (70/70), done. 4Writing objects: 100% (84/84), 20.66 KiB | 729.00 KiB/s, done. 5Total 84 (delta 2), reused 0 (delta 0) 6remote: Compressing source files... done. 7remote: Building source: 8remote: 9remote: ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used. 10remote: Detected buildpacks: Ruby,Node.js 11remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order 12remote: -----> Ruby app detected 13remote: -----> Compiling Ruby/Rails 14remote: -----> Using Ruby version: ruby-2.4.4 15remote: -----> Installing dependencies using bundler 1.15.2 16remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment 17remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.2). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`. 18・ 192021remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 22remote: 23remote: current directory: 24remote: /tmp/build_b35877803c021e12bad768066e373e67/vendor/bundle/ruby/2.4.0/gems/sqlite3-1.3.13/ext/sqlite3 25remote: /tmp/build_b35877803c021e12bad768066e373e67/vendor/ruby-2.4.4/bin/ruby -r 26remote: ./siteconf20180609-311-15z5b57.rb extconf.rb 27remote: checking for sqlite3.h... no 28remote: sqlite3.h is missing. Try 'brew install sqlite3', 29remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev' 30remote: and check your shared library search path (the 31remote: location where your sqlite3 shared library is located). 32remote: *** extconf.rb failed *** 33remote: Could not create Makefile due to some reason, probably lack of necessary 34remote: libraries and/or headers. Check the mkmf.log file for more details. You may 35remote: need configuration options. 36remote: 37remote: Provided configuration options: 38remote: --with-opt-dir 39remote: --without-opt-dir 40remote: --with-opt-include 41remote: --without-opt-include=${opt-dir}/include 42remote: --with-opt-lib 43remote: --without-opt-lib=${opt-dir}/lib 44remote: --with-make-prog 45remote: --without-make-prog 46remote: --srcdir=. 47remote: --curdir 48remote: --ruby=/tmp/build_b35877803c021e12bad768066e373e67/vendor/ruby-2.4.4/bin/$(RUBY_BASE_NAME) 49remote: --with-sqlite3-config 50remote: --without-sqlite3-config 51remote: --with-pkg-config 52remote: --without-pkg-config 53remote: --with-sqlite3-dir 54remote: --without-sqlite3-dir 55remote: --with-sqlite3-include 56remote: --without-sqlite3-include=${sqlite3-dir}/include 57remote: --with-sqlite3-lib 58remote: --without-sqlite3-lib=${sqlite3-dir}/lib 59remote: 60remote: To see why this extension failed to compile, please check the mkmf.log which can 61remote: be found here: 62remote: 63remote: /tmp/build_b35877803c021e12bad768066e373e67/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/sqlite3-1.3.13/mkmf.log 64remote: 65remote: extconf failed, exit code 1 66remote: 67remote: Gem files will remain installed in 68remote: /tmp/build_b35877803c021e12bad768066e373e67/vendor/bundle/ruby/2.4.0/gems/sqlite3-1.3.13 69remote: for inspection. 70remote: Results logged to 71remote: /tmp/build_b35877803c021e12bad768066e373e67/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/sqlite3-1.3.13/gem_make.out 72remote: 73remote: An error occurred while installing sqlite3 (1.3.13), and Bundler cannot 74remote: continue. 75remote: Make sure that `gem install sqlite3 -v '1.3.13'` succeeds before bundling. 76remote: 77remote: In Gemfile: 78remote: sqlite3 79remote: Bundler Output: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.2). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`. 80818283remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 84remote: 85remote: current directory: 86remote: /tmp/build_b35877803c021e12bad768066e373e67/vendor/bundle/ruby/2.4.0/gems/sqlite3-1.3.13/ext/sqlite3 87remote: /tmp/build_b35877803c021e12bad768066e373e67/vendor/ruby-2.4.4/bin/ruby -r 88remote: ./siteconf20180609-311-15z5b57.rb extconf.rb 89remote: checking for sqlite3.h... no 90remote: sqlite3.h is missing. Try 'brew install sqlite3', 91remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev' 92remote: and check your shared library search path (the 93remote: location where your sqlite3 shared library is located). 94remote: *** extconf.rb failed *** 95remote: Could not create Makefile due to some reason, probably lack of necessary 96remote: libraries and/or headers. Check the mkmf.log file for more details. You may 97remote: need configuration options. 98remote: 99remote: Provided configuration options: 100remote: --with-opt-dir 101remote: --without-opt-dir 102remote: --with-opt-include 103remote: --without-opt-include=${opt-dir}/include 104remote: --with-opt-lib 105remote: --without-opt-lib=${opt-dir}/lib 106remote: --with-make-prog 107remote: --without-make-prog 108remote: --srcdir=. 109remote: --curdir 110remote: --ruby=/tmp/build_b35877803c021e12bad768066e373e67/vendor/ruby-2.4.4/bin/$(RUBY_BASE_NAME) 111remote: --with-sqlite3-config 112remote: --without-sqlite3-config 113remote: --with-pkg-config 114remote: --without-pkg-config 115remote: --with-sqlite3-dir 116remote: --without-sqlite3-dir 117remote: --with-sqlite3-include 118remote: --without-sqlite3-include=${sqlite3-dir}/include 119remote: --with-sqlite3-lib 120remote: --without-sqlite3-lib=${sqlite3-dir}/lib 121remote: 122remote: To see why this extension failed to compile, please check the mkmf.log which can 123remote: be found here: 124remote: 125remote: /tmp/build_b35877803c021e12bad768066e373e67/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/sqlite3-1.3.13/mkmf.log 126remote: 127remote: extconf failed, exit code 1 128remote: 129remote: Gem files will remain installed in 130remote: /tmp/build_b35877803c021e12bad768066e373e67/vendor/bundle/ruby/2.4.0/gems/sqlite3-1.3.13 131remote: for inspection. 132remote: Results logged to 133remote: /tmp/build_b35877803c021e12bad768066e373e67/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/sqlite3-1.3.13/gem_make.out 134remote: 135remote: An error occurred while installing sqlite3 (1.3.13), and Bundler cannot 136remote: continue. 137remote: Make sure that `gem install sqlite3 -v '1.3.13'` succeeds before bundling. 138remote: 139remote: In Gemfile: 140remote: sqlite3 141remote: ! 142remote: ! Failed to install gems via Bundler. 143remote: ! Detected sqlite3 gem which is not supported on Heroku: 144remote: ! https://devcenter.heroku.com/articles/sqlite3 145remote: ! 146remote: ! Push rejected, failed to compile Ruby app. 147remote: 148remote: ! Push failed 149remote: Verifying deploy... 150remote: 151remote: ! Push rejected to serene-falls-29965. 152remote: 153To https://git.heroku.com/serene-falls-29965.git 154 ! [remote rejected] master -> master (pre-receive hook declined) 155error: failed to push some refs to 'https://git.heroku.com/serene-falls-29965.git'

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

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

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

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

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

guest

回答1

0

自己解決

各ファイルの変更を保存していなかったからでした。
解決です。
ご覧いただいた方、ありがとうございました。

投稿2018/06/09 10:04

koki0125

総合スコア24

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問