前提・実現したいこと
railsアプリをherokuでデプロイするところで詰まってします。
発生している問題・エラーメッセージ
git push heroku master
を行うと以下のものがでます。多分失敗してますよね。
Counting objects: 7691, done. Delta compression using up to 4 threads. Compressing objects: 100% (6245/6245), done. Writing objects: 100% (7691/7691), 34.01 MiB | 3.66 MiB/s, done. Total 7691 (delta 1009), reused 7564 (delta 985) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Building on the Heroku-18 stack remote: -----> Determining which buildpack to use for this app 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: -----> Installing bundler 2.2.11 remote: -----> Removing BUNDLED WITH version in the Gemfile.lock remote: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-2.5.5 remote: -----> Installing dependencies using bundler 2.2.11 remote: Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4 remote: Fetching gem metadata from https://rubygems.org/............ remote: Your bundle is locked to mimemagic (0.3.5), but that version could not be found remote: in any of the sources listed in your Gemfile. If you haven't changed sources, remote: that means the author of mimemagic (0.3.5) has removed it. You'll need to update remote: your bundle to a version other than mimemagic (0.3.5) that hasn't been removed remote: in order to install. remote: Bundler Output: Fetching gem metadata from https://rubygems.org/............ remote: Your bundle is locked to mimemagic (0.3.5), but that version could not be found remote: in any of the sources listed in your Gemfile. If you haven't changed sources, remote: that means the author of mimemagic (0.3.5) has removed it. You'll need to update remote: your bundle to a version other than mimemagic (0.3.5) that hasn't been removed remote: in order to install. remote: remote: ! remote: ! Failed to install gems via Bundler. 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: 462b7af89e288e242ac9f14de6*********** remote: ! remote: ! We have detected that you have triggered a build from source code with version 462b7af89e288e242ac9f14de6260********** 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 appname remote: To https://git.heroku.com/appname.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/appname.git'
この上で、
heroku open
を行うと以下のエラーがでます。
▸ Error opening web browser. ▸ Error: Exited with code 3 ▸ ▸ Manually visit https://circlethree.herokuapp.com/ in your ▸ browser.
試したこと
sudo heroku buildpacks
でbuildpaksを確認したところ、no Buildpack URL set.と返されたので、
sudo heroku buildpacks:set heroku/ruby
でbuildpacksをいれました(?)これでsudo heroku buildpacksをしたら、
=== appname Buildpack URL heroku/ruby
と表示されるようになりました。でも、
! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
が消えただけで、あいかわらずgit pushしてもエラーがでます。
また、ローカルとherokuのbundlerのバージョンを合わせれば治るという記事をみて確認したけれど、どちらもversion 2.2.11でした。まだ治りません。
https://yumishin.com/heroku-push-error/
補足情報(FW/ツールのバージョンなど)
mysqlを使いたいので、
heroku addons:add cleardb
というコマンドを打ち、結果は
Created cleardb-reticulated-***** as CLEARDB_SILVER_URL Use heroku addons:docs cleardb to view documentation
と出ているので、データベースはちゃんと作れているのだと思います。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/03/29 06:48
2021/03/29 07:00
2021/03/29 07:21