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

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

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

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Git

Gitはオープンソースの分散バージョン管理システム(DVCS)です。

Heroku

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

Q&A

2回答

1126閲覧

git push heroku master でデプロイが全然できません。

sk-

総合スコア2

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Git

Gitはオープンソースの分散バージョン管理システム(DVCS)です。

Heroku

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

0グッド

0クリップ

投稿2021/04/28 03:47

編集2021/04/30 13:47

heroku logs --tail --app アプリ名
した後のターミナル文です

2021-04-28T10:12:05.578256+00:00 app[api]: Starting process with command `rails db:migrate` by user メールアドレス 2021-04-28T10:12:10.545982+00:00 heroku[run.1203]: Awaiting client 2021-04-28T10:12:10.566791+00:00 heroku[run.1203]: Starting process with command `rails db:migrate` 2021-04-28T10:12:10.693519+00:00 heroku[run.1203]: State changed from starting to up 2021-04-28T10:12:17.371660+00:00 heroku[run.1203]: Process exited with status 0 2021-04-28T10:12:17.431771+00:00 heroku[run.1203]: State changed from up to complete 2021-04-28T16:17:40.000000+00:00 app[api]: Build started by user メールアドレス 2021-04-28T16:17:44.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/cbcd8271-858f-4b81-82a9-dc347d5e57c9/activity/builds/fb48bd44-74c9-417a-91a3-624b4a7c8e18 2021-04-29T10:19:22.000000+00:00 app[api]: Build started by user メールアドレス 2021-04-29T10:19:25.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/cbcd8271-858f-4b81-82a9-dc347d5e57c9/activity/builds/62ddee4c-f9b9-4597-89d5-685a0f311215

git push heroku masterの結果です
自分のrailsのバージョンに合わせて環境構築しようとして
$ heroku buildpacks:add heroku/nodejs
$ heroku buildpacks:add heroku/ruby
を実行したんですがエラーが変わりませんでした。

numerating objects: 264, done. Counting objects: 100% (243/243), done. Delta compression using up to 8 threads Compressing objects: 100% (199/199), done. Writing objects: 100% (202/202), 23.39 KiB | 1.67 MiB/s, done. Total 202 (delta 137), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Building on the Heroku-18 stack remote: -----> Using buildpacks: remote: 1. https://github.com/bundler/heroku-buildpack-bundler2 remote: 2. heroku/nodejs remote: 3. heroku/ruby remote: -----> Ruby app detected remote: /tmp/codon/tmp/buildpacks/39f112f50b07a72959c8a346ce561f7cb404a86c/bin/compile: line 3: heroku/ruby: No such file or directory remote: This buildpack is no longer supported, please use which now supports Bundler 2 directly remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: ! remote: ! ## Warning - The same version of this code has already been built: cfa1924a3c6eb6390f2dd8f4e559df759a2c4a1b remote: ! remote: ! We have detected that you have triggered a build from source code with version cfa1924a3c6eb6390f2dd8f4e559df759a2c4a1b remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch. remote: ! remote: ! If you are developing on a branch and deploying via git you must run: remote: ! remote: ! git push heroku <branchname>:main remote: ! remote: ! This article goes into details on the behavior: remote: ! https://devcenter.heroku.com/articles/duplicate-build-version remote: remote: Verifying deploy... remote: remote: ! Push rejected to アプリ名. remote: To https://git.heroku.com/アプリ名.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/アプリ名.git'

heroku buildpacksした結果です。

=== アプリ名 Buildpack URLs 1. https://github.com/bundler/heroku-buildpack-bundler2 2. heroku/nodejs 3. heroku/ruby

buildpacksをクリアしてだいぶエラーが解消したのですが

remote: To see why this extension failed to compile, please check the mkmf.log which can remote: be found here: remote: remote: /tmp/build_22c3adf4/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/sqlite3-1.3.13/mkmf.log remote: remote: extconf failed, exit code 1 remote: remote: Gem files will remain installed in remote: /tmp/build_22c3adf4/vendor/bundle/ruby/2.6.0/gems/sqlite3-1.3.13 for inspection. remote: Results logged to remote: /tmp/build_22c3adf4/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/sqlite3-1.3.13/gem_make.out remote: remote: An error occurred while installing sqlite3 (1.3.13), and Bundler cannot remote: continue. remote: Make sure that `gem install sqlite3 -v '1.3.13' --source remote: 'https://rubygems.org/'` 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: ! remote: ! ## Warning - The same version of this code has already been built: cfa1924a3c6eb6390f2dd8f4e559df759a2c4a1b remote: ! remote: ! We have detected that you have triggered a build from source code with version cfa1924a3c6eb6390f2dd8f4e559df759a2c4a1b remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch. remote: ! remote: ! If you are developing on a branch and deploying via git you must run: remote: ! remote: ! git push heroku <branchname>:main remote: ! remote: ! This article goes into details on the behavior: remote: ! https://devcenter.heroku.com/articles/duplicate-build-version remote: remote: Verifying deploy... remote: remote: ! Push rejected to アプリ名. remote: To https://git.heroku.com/アプリ名.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/アプリ名.git'

brew install postgresqlを実行してpostgresqlをインストールした後にbrew services start postgresqlwで起動してその後にgit push heroku masterを実行したんですがエラー文が変わリませんでした。

何が問題か全くわかりません、どなたかご教授ください。

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

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

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

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

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

m.ts10806

2021/04/28 03:55

ensure you can run とありますが、その指示内容は試されたのでしょうか
sk-

2021/04/28 03:58

bundle exec rake は試しました、けど解決しませんでした。
m.ts10806

2021/04/28 04:04

試した結果どうなったのか具体的に記載してください。 でないと何も調べず試さず丸投げしている状態です
sk-

2021/04/28 04:13

bundle exec rake -Pを試した結果このような記述が出ましたが その後に git push heroku masterを実行しましたがエラーが変わりませんでした。 rake about environment rake action_mailbox:copy_migrations rake action_mailbox:ingress:environment rake action_mailbox:ingress:exim action_mailbox:ingress:environment rake action_mailbox:ingress:postfix action_mailbox:ingress:environment rake action_mailbox:ingress:qmail action_mailbox:ingress:environment rake action_mailbox:install environment run_installer copy_migrations rake action_mailbox:install:migrations rake action_mailbox:run_installer rake action_text:copy_migrations rake action_text:install environment run_installer copy_migrations rake action_text:install:migrations rake action_text:run_installer rake active_storage:install environment rake active_storage:install:migrations rake active_storage:update environment rake app:template environment rake app:templates:copy rake app:update update:configs update:bin update:active_storage update:upgrade_guide_info rake app:update:active_storage rake app:update:bin rake app:update:configs rake app:update:upgrade_guide_info rake assets:clean environment rake assets:clobber environment rake assets:environment rake assets:precompile environment yarn:install rake cache_digests:dependencies environment rake cache_digests:nested_dependencies environment rake db:_dump rake db:abort_if_pending_migrations load_config rake db:charset load_config rake db:check_protected_environments load_config rake db:collation load_config rake db:create load_config rake db:create:all load_config rake db:drop load_config check_protected_environments rake db:drop:_unsafe load_config rake db:drop:all load_config check_protected_environments rake db:environment:set load_config rake db:fixtures:identify load_config rake db:fixtures:load load_config rake db:forward load_config rake db:load_config environment rake db:migrate load_config rake db:migrate:down load_config rake db:migrate:redo load_config rake db:migrate:reset db:drop db:create db:migrate rake db:migrate:status load_config rake db:migrate:up load_config rake db:prepare load_config rake db:purge load_config check_protected_environments rake db:purge:all load_config check_protected_environments rake db:reset db:drop db:setup rake db:rollback load_config rake db:schema:cache:clear load_config rake db:schema:cache:dump load_config rake db:schema:dump load_config rake db:schema:load load_config check_protected_environments rake db:schema:load_if_ruby db:create environment rake db:seed load_config rake db:seed:replant load_config truncate_all seed rake db:setup db:schema:load_if_ruby db:structure:load_if_sql seed rake db:structure:dump load_config rake db:structure:load load_config check_protected_environments rake db:structure:load_if_sql db:create environment rake db:test:load db:test:purge rake db:test:load_schema db:test:purge rake db:test:load_structure db:test:purge rake db:test:prepare load_config rake db:test:purge load_config check_protected_environments rake db:truncate_all load_config check_protected_environments rake db:version load_config rake default spec rake dev:cache environment rake environment rake initializers environment rake log:clear rake middleware environment rake notes environment rake notes:custom environment rake notes:fixme environment rake notes:optimize environment rake notes:todo environment rake railties:install:migrations db:load_config rake restart rake routes environment rake secret rake spec spec:prepare rake spec:helpers spec:prepare rake spec:models spec:prepare rake spec:prepare rake spec:requests spec:prepare rake spec:statsetup rake stats spec:statsetup rake test rake test:channels test:prepare rake test:controllers test:prepare rake test:db db:test:prepare test rake test:functionals test:prepare rake test:generators test:prepare rake test:helpers test:prepare rake test:integration test:prepare rake test:jobs test:prepare rake test:mailboxes test:prepare rake test:mailers test:prepare rake test:models test:prepare rake test:prepare rake test:run test rake test:system test:prepare rake test:units test:prepare rake time:zones rake time:zones:all rake time:zones:local rake time:zones:us rake tmp rake tmp/cache rake tmp/cache/assets rake tmp/pids rake tmp/sockets rake tmp:cache:clear rake tmp:clear tmp:cache:clear tmp:sockets:clear tmp:screenshots:clear rake tmp:create tmp/cache tmp/sockets tmp/pids tmp/cache/assets rake tmp:pids:clear rake tmp:screenshots:clear rake tmp:sockets:clear rake webdrivers:chromedriver:remove rake webdrivers:chromedriver:update rake webdrivers:chromedriver:version rake webdrivers:edgedriver:remove rake webdrivers:edgedriver:update rake webdrivers:edgedriver:version rake webdrivers:geckodriver:remove rake webdrivers:geckodriver:update rake webdrivers:geckodriver:version rake webdrivers:iedriver:remove rake webdrivers:iedriver:update rake webdrivers:iedriver:version rake webpacker rake webpacker:binstubs check_node check_yarn rake webpacker:check_binstubs rake webpacker:check_node rake webpacker:check_yarn rake webpacker:clean webpacker:verify_install environment rake webpacker:clobber webpacker:verify_install environment rake webpacker:compile webpacker:verify_install environment rake webpacker:info rake webpacker:install check_node check_yarn rake webpacker:install:angular webpacker:verify_install rake webpacker:install:coffee webpacker:verify_install rake webpacker:install:elm webpacker:verify_install rake webpacker:install:erb webpacker:verify_install rake webpacker:install:react webpacker:verify_install rake webpacker:install:stimulus webpacker:verify_install rake webpacker:install:svelte webpacker:verify_install rake webpacker:install:typescript webpacker:verify_install rake webpacker:install:vue webpacker:verify_install rake webpacker:verify_install check_node check_yarn check_binstubs rake webpacker:yarn_install rake yarn:install webpacker:yarn_install rake zeitwerk:check environment
m.ts10806

2021/04/28 04:34

質問は編集できます。こちらは「質問への追記修正依頼」のコメント欄です
sk-

2021/04/28 05:03

bundle exec rake -Pで出てきたものを一つずつ試せば良いのでしょうか?
mather

2021/04/28 06:09

まず落ち着いて読んでください。どうすればよいのか今すぐ答えが欲しいのはわかりますが、現状把握しないとわかりません。 bundle exec rake -P を実行した際に出力される内容を、「質問内容へ追記」してください。 コードブロック ``` を使って提示すると良いです。
sk-

2021/04/28 09:17 編集

gemfileを一度消してもう一回ダウンロードしたらエラーが変わりました 2021-04-28T08:26:01.083975+00:00 app[api]: Starting process with command `rails db:migrate` by user メールアドレス 2021-04-28T08:26:05.992357+00:00 heroku[run.9292]: Awaiting client 2021-04-28T08:26:06.011828+00:00 heroku[run.9292]: Starting process with command `rails db:migrate` 2021-04-28T08:26:06.193958+00:00 heroku[run.9292]: State changed from starting to up 2021-04-28T08:26:12.670311+00:00 heroku[run.9292]: Process exited with status 0 2021-04-28T08:26:12.774594+00:00 heroku[run.9292]: State changed from up to complete 2021-04-28T08:27:49.000000+00:00 app[api]: Build started by user メールアドレス 2021-04-28T08:27:52.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/cbcd8271-858f-4b81-82a9-dc347d5e57c9/activity/builds/2d30c907-1d43-41a4-8abc-1a5fa54fab53 エラーが変わりました
sk-

2021/04/28 09:13

rails db;migrateを実行したがなおりませんでした
mather

2021/04/28 10:48

再度いいますが、「質問内容へ追記」してください。
mather

2021/04/28 10:51

Herokuのログで app[web.1] は正しく起動しているように見えるのですが、 app[api] で失敗しているのが気になります。 Herokuデプロイ用に Procfile があると思うのですが、 Procfile の内容を提示してください。
sk-

2021/04/28 10:59

すみません、どこで確認すれば良いですか。
mather

2021/04/28 19:07 編集

Procfile の内容を質問に追記してください。 ファイルが存在しない場合は「存在しない」と書いてもらえればよいのですが。
sk-

2021/04/29 04:40

Procofileが入っているフォルダはどこですか?多分存在すると思うのですが
mather

2021/04/29 05:16

プロジェクトルートディレクトリにありませんか?
sk-

2021/04/29 06:00

探したんですけどないっぽいです。
sk-

2021/04/29 11:02

プロジェクトルートディレクトリってなんでしょうか?
m.ts10806

2021/04/29 11:04

rails をインストールしたディレクトリです。
sk-

2021/04/30 07:06

ありました、projectsディレクトリでもprocofileというのが見つかりません
guest

回答2

0

ensure you can run $ bundle exec rake -P against your app

訳: bundle exec rake -P があなたのアプリケーションで実行できるか確認してください。

というメッセージが出てますが、確認しましたか?
(ということから一つ一つ確認せざるを得なくなるので「いろんなサイトを調べて実行してますが」の内容をきちんと書いてください。)

2021-04-30追記

こちらのエラーですが、

remote: -----> Building on the Heroku-18 stack remote: -----> Using buildpack: https://github.com/bundler/heroku-buildpack-bundler2 remote: -----> Ruby app detected remote: /tmp/codon/tmp/buildpacks/39f112f50b07a72959c8a346ce561f7cb404a86c/bin/compile: line 3: heroku/ruby: No such file or directory remote: This buildpack is no longer supported, please use which now supports Bundler 2 directly remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to アプリ名.

https://github.com/rubygems/heroku-buildpack-bundler2
こちらの buildpack はすでに使われていないようです。質問者が参考にしているページの情報が古いかもしれません。

Heroku の公式ドキュメントを見て、お使いのライブラリのバージョンに合わせて環境構築してみてください。
https://devcenter.heroku.com/articles/ruby-support

投稿2021/04/28 03:57

編集2021/04/30 09:10
mather

総合スコア6753

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

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

sk-

2021/04/28 04:27

heroku stopping all processes with sigtermとかheroku ensure you can run `$ bundle exec rake -p` against your appとかheroku build failed -- check your build outputとか表記されているエラー文を調べて対処法を実行してみたんですけどうまくいきません。
sk-

2021/04/29 10:29

$ bundle exec rake -Pの結果です ``` rake about environment rake action_mailbox:copy_migrations rake action_mailbox:ingress:environment rake action_mailbox:ingress:exim action_mailbox:ingress:environment rake action_mailbox:ingress:postfix action_mailbox:ingress:environment rake action_mailbox:ingress:qmail action_mailbox:ingress:environment rake action_mailbox:install environment run_installer copy_migrations rake action_mailbox:install:migrations rake action_mailbox:run_installer rake action_text:copy_migrations rake action_text:install environment run_installer copy_migrations rake action_text:install:migrations rake action_text:run_installer rake active_storage:install environment rake active_storage:install:migrations rake active_storage:update environment rake app:template environment rake app:templates:copy rake app:update update:configs update:bin update:active_storage update:upgrade_guide_info rake app:update:active_storage rake app:update:bin rake app:update:configs rake app:update:upgrade_guide_info rake assets:clean environment rake assets:clobber environment rake assets:environment rake assets:precompile environment yarn:install rake cache_digests:dependencies environment rake cache_digests:nested_dependencies environment rake db:_dump rake db:abort_if_pending_migrations load_config rake db:charset load_config rake db:check_protected_environments load_config rake db:collation load_config rake db:create load_config rake db:create:all load_config rake db:drop load_config check_protected_environments rake db:drop:_unsafe load_config rake db:drop:all load_config check_protected_environments rake db:environment:set load_config rake db:fixtures:identify load_config rake db:fixtures:load load_config rake db:forward load_config rake db:load_config environment rake db:migrate load_config rake db:migrate:down load_config rake db:migrate:redo load_config rake db:migrate:reset db:drop db:create db:migrate rake db:migrate:status load_config rake db:migrate:up load_config rake db:prepare load_config rake db:purge load_config check_protected_environments rake db:purge:all load_config check_protected_environments rake db:reset db:drop db:setup rake db:rollback load_config rake db:schema:cache:clear load_config rake db:schema:cache:dump load_config rake db:schema:dump load_config rake db:schema:load load_config check_protected_environments rake db:schema:load_if_ruby db:create environment rake db:seed load_config rake db:seed:replant load_config truncate_all seed rake db:setup db:schema:load_if_ruby db:structure:load_if_sql seed rake db:structure:dump load_config rake db:structure:load load_config check_protected_environments rake db:structure:load_if_sql db:create environment rake db:test:load db:test:purge rake db:test:load_schema db:test:purge rake db:test:load_structure db:test:purge rake db:test:prepare load_config rake db:test:purge load_config check_protected_environments rake db:truncate_all load_config check_protected_environments rake db:version load_config rake default spec rake dev:cache environment rake environment rake initializers environment rake log:clear rake middleware environment rake notes environment rake notes:custom environment rake notes:fixme environment rake notes:optimize environment rake notes:todo environment rake railties:install:migrations db:load_config rake restart rake routes environment rake secret rake spec spec:prepare rake spec:helpers spec:prepare rake spec:models spec:prepare rake spec:prepare rake spec:requests spec:prepare rake spec:statsetup rake stats spec:statsetup rake test rake test:channels test:prepare rake test:controllers test:prepare rake test:db db:test:prepare test rake test:functionals test:prepare rake test:generators test:prepare rake test:helpers test:prepare rake test:integration test:prepare rake test:jobs test:prepare rake test:mailboxes test:prepare rake test:mailers test:prepare rake test:models test:prepare rake test:prepare rake test:run test rake test:system test:prepare rake test:units test:prepare rake time:zones rake time:zones:all rake time:zones:local rake time:zones:us rake tmp rake tmp/cache rake tmp/cache/assets rake tmp/pids rake tmp/sockets rake tmp:cache:clear rake tmp:clear tmp:cache:clear tmp:sockets:clear tmp:screenshots:clear rake tmp:create tmp/cache tmp/sockets tmp/pids tmp/cache/assets rake tmp:pids:clear rake tmp:screenshots:clear rake tmp:sockets:clear rake webdrivers:chromedriver:remove rake webdrivers:chromedriver:update rake webdrivers:chromedriver:version rake webdrivers:edgedriver:remove rake webdrivers:edgedriver:update rake webdrivers:edgedriver:version rake webdrivers:geckodriver:remove rake webdrivers:geckodriver:update rake webdrivers:geckodriver:version rake webdrivers:iedriver:remove rake webdrivers:iedriver:update rake webdrivers:iedriver:version rake webpacker rake webpacker:binstubs check_node check_yarn rake webpacker:check_binstubs rake webpacker:check_node rake webpacker:check_yarn rake webpacker:clean webpacker:verify_install environment rake webpacker:clobber webpacker:verify_install environment rake webpacker:compile webpacker:verify_install environment rake webpacker:info rake webpacker:install check_node check_yarn rake webpacker:install:angular webpacker:verify_install rake webpacker:install:coffee webpacker:verify_install rake webpacker:install:elm webpacker:verify_install rake webpacker:install:erb webpacker:verify_install rake webpacker:install:react webpacker:verify_install rake webpacker:install:stimulus webpacker:verify_install rake webpacker:install:svelte webpacker:verify_install rake webpacker:install:typescript webpacker:verify_install rake webpacker:install:vue webpacker:verify_install rake webpacker:verify_install check_node check_yarn check_binstubs rake webpacker:yarn_install rake yarn:install webpacker:yarn_install rake zeitwerk:check environment ```
sk-

2021/04/30 09:18

ruby '2.6.5'のバージョンに合わせれば良いということでしょうか?
mather

2021/04/30 09:24

使っているライブラリは Rails ですよね? URLを見てもらったら Rails のバージョン別に案内が書いてあります。 それに従ってみると良いでしょう。
sk-

2021/04/30 09:52

git push heroku masterの結果です 自分のrailsのバージョンに合わせて環境構築しようとして $ heroku buildpacks:add heroku/nodejs $ heroku buildpacks:add heroku/ruby を実行したんですがエラーが変わりませんでした。
mather

2021/04/30 10:26

> Detected sqlite3 gem which is not supported on Heroku そのまんまです。 sqlite3 を使うことはできません。 PostgreSQLなどを使いましょう。
mather

2021/04/30 10:43 編集

違います。これはPostgreSQLデータベースの使い方です。"PostgreSQL" で検索したものを内容も確認せず適当に持ってきていませんか? パニックになって思考停止してしまっているなら、一旦今のRailsアプリケーションをデプロイする試行錯誤は中断して、「Herokuで動作するRailsアプリケーションを作る」チュートリアルをやってみるべきだと思います。 https://devcenter.heroku.com/ja/articles/getting-started-with-rails6 これを実行する場合は、既存のソースコードとは全く別のディレクトリで実行しましょう。
sk-

2021/04/30 10:49

すみません、焦ってました大丈夫です。
sk-

2021/04/30 13:35

brew install postgresqlを実行してpostgresqlをインストールした後にbrew services start postgresqlwで起動してその後にgit push heroku masterを実行したんですがエラー文が変わリませんでした。
sk-

2021/04/30 13:36

どうしてでしょう?
mather

2021/04/30 17:01 編集

その行動がそもそも暗中模索している状態なので、Herokuのドキュメントにあるチュートリアルから始めるべきだと思ったのですが…。 brew install postgresql はお使いの Mac の端末内に PostgreSQL をインストールしています。 しかし、そもそも Heroku はオンラインサービスです。あなたの Mac のデータベースにはアクセスできません。 これ以降ざっくり解説を書きますが、手取り足取り教えてほしいなら、teratailではなく有償できちんと教えてくれるサービスを利用するべきです。もう回答を続けるのは難しいです。 まず、Rails がどのデータベースに接続するか設定をする必要があります。また、データベースごとに接続するためのライブラリが違います。 今回のsqlite3のエラーは、「あなたのアプリケーションはsqlite3に接続するためのライブラリを指定していますが、sqlite3はHerokuでは使えません。」と言われているのです。 設定の仕方を調べ、ライブラリを production モード用に切り替えるようにして、Heroku上で動くように設定する必要があります。 以上です。正解の手順を求めようとせず、自分で考えて、それでも何が問題かわからなければまだまだ知識不足なのでチュートリアルからやり直してください。 また、teratail で質問をするときのヒントもぜひ読んでください。 https://teratail.com/help/question-tips
guest

0

エラーメッセージの全文がないので断定はできかねますがおそらくmacとherokuで環境が違うからですね

sh

1bundle lock --add-platform x86_64-linux

投稿2021/04/30 10:12

asm

総合スコア15147

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

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

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

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

ただいまの回答率
85.47%

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

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

質問する

関連した質問