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

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

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

Cloud9は、クラウドからのプログラミングが可能になるWebサービス。IDEとしての機能が搭載されており、GitHubやHerokuなど他ツールとの連携も可能です。ブラウザ上で動くため、デバイスに関係なく開発環境を準備できます。

Heroku

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

Ruby on Rails

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

Q&A

解決済

1回答

501閲覧

Railsチュートリアル1章Herokuデプロイできない

tak_tak_tak

総合スコア11

Cloud9

Cloud9は、クラウドからのプログラミングが可能になるWebサービス。IDEとしての機能が搭載されており、GitHubやHerokuなど他ツールとの連携も可能です。ブラウザ上で動くため、デバイスに関係なく開発環境を準備できます。

Heroku

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

Ruby on Rails

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

0グッド

1クリップ

投稿2020/02/27 15:03

編集2020/02/28 02:38

Railsチュートリアル1章、Herokuにデプロイしても、 「Heroku | Welcome to your new app!」のメッセージが表示される。 heroku createで実行した際に 生成されたアドレスをブラウザで表示しましたが hello,world!と表示したいのに Heroku | Welcome to your new app!と表示されます。

該当のソースコード

ソースコード remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. remote: remote: current directory: remote: /tmp/build_78d5ab0adc0d2024f709fe1a14ecbd52/vendor/bundle/ruby/2.5.0/gems/sqlite3-1.4.2/ext/sqlite3 remote: /tmp/build_78d5ab0adc0d2024f709fe1a14ecbd52/vendor/ruby-2.5.7/bin/ruby -r remote: ./siteconf20200228-280-1fu6kdv.rb extconf.rb remote: checking for sqlite3.h... no remote: sqlite3.h is missing. Try 'brew install sqlite3', remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev' remote: and check your shared library search path (the remote: location where your sqlite3 shared library is located). remote: *** extconf.rb failed *** remote: Could not create Makefile due to some reason, probably lack of necessary remote: libraries and/or headers. Check the mkmf.log file for more details. You may remote: need configuration options. remote: remote: Provided configuration options: remote: --with-opt-dir remote: --without-opt-dir remote: --with-opt-include remote: --without-opt-include=${opt-dir}/include remote: --with-opt-lib remote: --without-opt-lib=${opt-dir}/lib remote: --with-make-prog remote: --without-make-prog remote: --srcdir=. remote: --curdir remote: --ruby=/tmp/build_78d5ab0adc0d2024f709fe1a14ecbd52/vendor/ruby-2.5.7/bin/$(RUBY_BASE_NAME) remote: --with-sqlcipher remote: --without-sqlcipher remote: --with-sqlite3-config remote: --without-sqlite3-config remote: --with-pkg-config remote: --without-pkg-config remote: --with-sqlcipher remote: --without-sqlcipher remote: --with-sqlite3-dir remote: --without-sqlite3-dir remote: --with-sqlite3-include remote: --without-sqlite3-include=${sqlite3-dir}/include remote: --with-sqlite3-lib remote: --without-sqlite3-lib=${sqlite3-dir}/lib remote: remote: To see why this extension failed to compile, please check the mkmf.log which can remote: be found here: remote: remote: /tmp/build_78d5ab0adc0d2024f709fe1a14ecbd52/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/sqlite3-1.4.2/mkmf.log remote: remote: extconf failed, exit code 1 remote: remote: Gem files will remain installed in remote: /tmp/build_78d5ab0adc0d2024f709fe1a14ecbd52/vendor/bundle/ruby/2.5.0/gems/sqlite3-1.4.2 remote: for inspection. remote: Results logged to remote: /tmp/build_78d5ab0adc0d2024f709fe1a14ecbd52/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/sqlite3-1.4.2/gem_make.out remote: remote: An error occurred while installing sqlite3 (1.4.2), and Bundler cannot continue. remote: Make sure that `gem install sqlite3 -v '1.4.2' --source 'https://rubygems.org/'` remote: succeeds before bundling. remote: remote: In Gemfile: remote: sqlite3 remote: remote: ! remote: ! Failed to install gems via Bundler. remote: ! Detected sqlite3 gem which is not supported on Heroku: remote: ! https://devcenter.heroku.com/articles/sqlite3 remote: ! remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to lit-caverns-45870. remote: To https://git.heroku.com/lit-caverns-45870.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/lit-caverns-45870.git'

ここにより詳細な情報を記載してください。

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

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

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

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

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

sansansandodo

2020/02/28 00:11

そのエラー文は結果だけなので、もうちょっと上までさかのぼって、失敗したタイミングから貼り付けてください。 原因を記述してある行があると思います。
tak_tak_tak

2020/02/28 02:39

失礼しました編集いたしました。
退会済みユーザー

退会済みユーザー

2020/02/28 03:22

heroku では sqlite3 は利用不可能(公式サイトドキュメントに記載あり)
guest

回答1

0

ベストアンサー

sqlite3 は利用不可能なので、postgresqlに変更してください。
Gemfileにproduction環境ではpgを使うように追記し、sqlite3はdev,testのみで使うように変更します。
database.ymlは変更しなくても動いた気がしますが、postgresql向けに修正しときましょう

投稿2020/02/28 04:48

sansansandodo

総合スコア248

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

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

tak_tak_tak

2020/02/28 10:57

Gmfileとymlを変更したらデプロイできました、ありがとうございます!!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問