#前提・実現したいこと
AWScloud9からherokuへのデプロイを行いたいです。
#発生している問題・エラーメッセージ
Railsチュートリアル1章の通りに進めていたつもりなのですが、
$heroku createで生成したURL(2つあるURLのうちの最初に記載されているURL)へ移行した際、『bye!』などの(ローカル環境で表示できた)、メッセージ表示したいのですが以下のようなものになってしまいます。
![
#該当のソースコード
ec2-user:~/environment (modify-README) $ heroku create Creating app... done, ⬢ thawing-island-51898 https://thawing-island-51898.herokuapp.com/ | https://git.heroku.com/thawing-island-51898.git
#自分で調べたことや試したこと
①リンク内容
の記事を参考に$ heroku logs | grep error
で確認したところ
at=error code=H14 desc="No web processes running"
との事です
②リンク内容
を参考に進めたところ
エラーは解決せず立ち止まってしまいました
⬇️以下は参考になるか分からないですが、行った事です。
$ git push fatal: The current branch modify-README has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin modify-README
$ bundle install --without production The Gemfile specifies no dependencies Bundle complete! 0 Gemfile dependencies, 1 gem now installed. Gems in the groups production, development and test were not installed. Use `bundle info [gemname]` to see where a bundled gem is installed. ec2-user:~/environment (modify-README) $ git commit -a -m "Update Gemfile for Heroku" [modify-README b30f6a4] Update Gemfile for Heroku 1 file changed, 4 insertions(+)
$ heroku --version heroku/7.35.1 linux-x64 node-v12.13.0
その後、Herokuへログイン完了は完了
$heroku run rails console Running rails console on ⬢ obscure-ocean-41599... up, run.8355 (Free) bash: rails: command not found
$ heroku stack:set container Stack set. Next release on ⬢ obscure-ocean-41599 will use container. Run git push heroku master to create a new release on ⬢ obscure-ocean-41599. ec2-user:~/environment (modify-README) $ git push heroku master Everything up-to-date ec2-user:~/environment (modify-README) $ heroku ps:scale web=1 Scaling dynos... ! ▸ Couldn't find that process type (web).
#補足情報
・開発環境:AWS Cloud9
・データベース:sqlite3 version3.7.17
・ブラウザ:GoogleChrome
・Rails 6.0.2.1
情報が少なくてすみません。
追記すべき情報などございましたら、言っていただきたいと思います。
回答お待ちしております。
#追記①
$ git remote -v と $ git push heroku masterを行ったところ
$heroku createのURLでは同じく表示したいものが表示されませんでした。
『does not have access to boiling-falls-6570.』と。
僕のアカウントではアクセスできないとの事です。
ググったところ僕と同じエラーでの解決はみられなかったのですが、以下を参考にしました。
リンク内容
しかし、解決せずです。
ec2-user:~/environment/hello_app (modify-README) $ git remote -v heroku https://git.heroku.com/boiling-falls-6570.git (fetch) heroku https://git.heroku.com/boiling-falls-6570.git (push) origin git@bitbucket.org:(ここはユーザー名です)/toy_app.git (fetch) origin git@bitbucket.org:(ここはユーザー名です)/toy_app.git (push) ec2-user:~/environment/hello_app (modify-README) $ git push heroku master remote: ! Your account (メールアドレスです) does not have access to boiling-falls-6570. fatal: unable to access 'https://git.heroku.com/boiling-falls-6570.git/': The requested URL returned error: 403
#追記②
記載されたurl(https://dashboard.heroku.com/apps/thawing-island-51898/deploy/heroku-git)の通り進めていったのですが、動かずです。。
コンソール結果は以下の通りです。
ec2-user:~/environment (modify-README) $ cd ~/environment/hello_app/ ec2-user:~/environment/hello_app (modify-README) $ source <(curl -sL https://cdn.learnenough.com/heroku_install) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 25.9M 100 25.9M 0 0 52.2M 0 --:--:-- --:--:-- --:--:-- 52.2M mv: cannot move ‘heroku’ to ‘/usr/local/heroku’: Directory not empty ec2-user:~/environment/hello_app (modify-README) $ heroku login heroku: Press any key to open up the browser to login or q to exit: › Error: quit ec2-user:~/environment/hello_app (modify-README) $ heroku login --interactive heroku: Enter your login credentials Email [epifa_kikka@icloud.com]: Password: ********* Logged in as (メールアドレス) ec2-user:~/environment/hello_app (modify-README) $ cd my-project/ bash: cd: my-project/: No such file or directory ec2-user:~/environment/hello_app (modify-README) $ git init Reinitialized existing Git repository in /home/ec2-user/environment/hello_app/.git/ ec2-user:~/environment/hello_app (modify-README) $ heroku git:remote -a thawing-island-51898 set git remote heroku to https://git.heroku.com/thawing-island-51898.git ec2-user:~/environment/hello_app (modify-README) $ git add . ec2-user:~/environment/hello_app (modify-README) $ git commit -am "make it better" [modify-README a5f6bad] make it better 3 files changed, 11 insertions(+), 22 deletions(-) ec2-user:~/environment/hello_app (modify-README) $ git push heroku master Counting objects: 13633, done. Compressing objects: 100% (12359/12359), done. Writing objects: 100% (13633/13633), 24.29 MiB | 3.25 MiB/s, done. Total 13633 (delta 5265), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: 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 1 … 一部省略 … remote: ###### WARNING: remote: remote: You have not declared a Ruby version in your Gemfile. remote: To set your Ruby version add this line to your Gemfile: remote: ruby '2.5.7' remote: # See https://devcenter.heroku.com/articles/ruby-versions for more information. remote: remote: remote: ###### WARNING: remote: remote: Replacing libpq with version libpq 5.12.1 remote: remote: This version includes a bug fix that can cause an exception remote: on boot for applications with incorrectly configured connection remote: values. For more information see: remote: remote: https://devcenter.heroku.com/articles/libpq-5-12-1-breaking-connection-behavior remote: remote: If your application breaks you can rollback to your last build. remote: You can also temporarially opt out of this behavior by setting: remote: remote: ``` remote: $ heroku config:set HEROKU_SKIP_LIBPQ12=1 remote: ``` remote: remote: In the future libpq 5.12 will be the default on the platform an remote: you will not be able to opt-out of the library. For more information see: remote: remote: https://devcenter.heroku.com/articles/libpq-5-12-1-breaking-connection-behavior remote: remote: remote: ###### WARNING: remote: remote: Detecting rails configuration failed remote: set HEROKU_DEBUG_RAILS_RUNNER=1 to debug remote: remote: remote: ###### WARNING: remote: remote: No Procfile detected, using the default web server. remote: We recommend explicitly declaring how to boot your server process via a Procfile. remote: https://devcenter.heroku.com/articles/ruby-default-web-server remote: remote: remote: remote: -----> Discovering process types remote: Procfile declares types -> (none) remote: Default types for buildpack -> console, rake, web remote: remote: -----> Compressing... remote: Done: 59.9M remote: -----> Launching... remote: Released v4 remote: https://thawing-island-51898.herokuapp.com/ deployed to Heroku remote: remote: Verifying deploy... done. To https://git.heroku.com/thawing-island-51898.git * [new branch] master -> master ec2-user:~/environment/hello_app (modify-README) $ heroku git:remote -a thawing-island-51898 set git remote heroku to https://git.heroku.com/thawing-island-51898.git ec2-user:~/environment/hello_app (modify-README) $ heroku logs --tail › Error: Multiple apps in git remotes › Usage: --remote heroku-staging › or: --app boiling-falls-6570 › Your local git repository has more than 1 app referenced in git › remotes. › Because of this, we can't determine which app you want to run this › command against. › Specify the app you want with --app or --remote. › Heroku remotes in repo: › thawing-island-51898 (heroku) › boiling-falls-6570 (heroku-staging) › › https://devcenter.heroku.com/articles/multiple-environments
【結果】
リンク内容を開いた結果
が表示されました。
このエラーで検索した結果たどり着いた記事(リンク内容)を参考に進めたのですが、解決せずです。。
$ heroku run rails console
した際の結果がこちらです。
› Error: Multiple apps in git remotes › Usage: --remote heroku-staging › or: --app boiling-falls-6570 › Your local git repository has more than 1 app referenced in git › remotes. › Because of this, we can't determine which app you want to run this › command against. › Specify the app you want with --app or --remote. › Heroku remotes in repo: › thawing-island-51898 (heroku) › boiling-falls-6570 (heroku-staging) › › https://devcenter.heroku.com/articles/multiple-environments
情報が少ないかもしれないですが、追記の必要があればいっていただきたいです。
お願いします。
回答1件
あなたの回答
tips
プレビュー