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

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

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

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

Ruby on Rails

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

Q&A

解決済

1回答

234閲覧

railsチュートリアルにてherokuへデプロイ出来ない事への質問

kingyo0802

総合スコア27

Heroku

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

Ruby on Rails

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

0グッド

0クリップ

投稿2019/07/15 10:31

編集2019/07/19 07:05

前提・実現したいこと

レイルズチュートリアル学習中にソースコードを試しに本番環境で動かしたいと思い
herokuへpushしたのですが「Method Not Allowed」と表示されて、動かないのでそれを解決したいです。

発生している問題・エラーメッセージ

$ git push heroku master Counting objects: 111, done. Compressing objects: 100% (95/95), done. Writing objects: 100% (111/111), 24.60 KiB | 1.23 MiB/s, done. Total 111 (delta 11), 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 remote: -----> Ruby app detected remote: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-2.5.5 remote: -----> Installing dependencies using bundler 1.15.2 remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.17.2). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`. 〜文字数制限の為、一部gemのインストール情報をカットしています。〜 remote: Bundle complete! 21 Gemfile dependencies, 57 gems now installed. remote: Gems in the groups development and test were not installed. remote: Bundled gems are installed into ./vendor/bundle. remote: Post-install message from i18n: remote: remote: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale. remote: But that may break your application. remote: remote: Please check your Rails app for 'config.i18n.fallbacks = true'. remote: If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be remote: 'config.i18n.fallbacks = [I18n.default_locale]'. remote: If not, fallbacks will be broken in your app by I18n 1.1.x. remote: remote: For more info see: remote: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0 remote: remote: Post-install message from sass: remote: remote: Ruby Sass has reached end-of-life and should no longer be used. remote: remote: * If you use Sass as a command-line tool, we recommend using Dart Sass, the new remote: primary implementation: https://sass-lang.com/install remote: remote: * If you use Sass as a plug-in for a Ruby web framework, we recommend using the remote: sassc gem: https://github.com/sass/sassc-ruby#readme remote: remote: * For more details, please refer to the Sass blog: remote: https://sass-lang.com/blog/posts/7828841 remote: remote: Bundle completed (43.91s) remote: Cleaning up the bundler cache. remote: -----> Installing node-v10.15.3-linux-x64 remote: -----> Detecting rake tasks remote: -----> Preparing app for Rails asset pipeline remote: Running: rake assets:precompile remote: Yarn executable was not detected in the system. remote: Download Yarn at https://yarnpkg.com/en/docs/install remote: I, [2019-07-15T10:05:13.969812 #1453] INFO -- : Writing /tmp/build_90ac4611b954492ce4b52437d11150e9/public/assets/application-86a3fd3b1e217ceb8f2069261313e734793e5074b3f462c54a813438e80e7839.js remote: I, [2019-07-15T10:05:13.970567 #1453] INFO -- : Writing /tmp/build_90ac4611b954492ce4b52437d11150e9/public/assets/application-86a3fd3b1e217ceb8f2069261313e734793e5074b3f462c54a813438e80e7839.js.gz remote: I, [2019-07-15T10:05:13.981555 #1453] INFO -- : Writing /tmp/build_90ac4611b954492ce4b52437d11150e9/public/assets/application-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css remote: I, [2019-07-15T10:05:13.981886 #1453] INFO -- : Writing /tmp/build_90ac4611b954492ce4b52437d11150e9/public/assets/application-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css.gz remote: Asset precompilation completed (3.03s) remote: Cleaning assets remote: Running: rake assets:clean remote: -----> Detecting rails configuration remote: 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.5' remote: # See https://devcenter.heroku.com/articles/ruby-versions for more information. remote: remote: ###### WARNING: remote: remote: Detecting rails configuration failed remote: set HEROKU_DEBUG_RAILS_RUNNER=1 to debug 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: -----> Discovering process types remote: Procfile declares types -> (none) remote: Default types for buildpack -> console, rake, web remote: remote: -----> Compressing... remote: Done: 35.3M remote: -----> Launching... remote: Released v6 remote: https://enthousiaste-vin-*****(伏せ字).herokuapp.com/ deployed to Heroku remote: remote: Verifying deploy... done. To https://git.heroku.com/~(urlが入る).git * [new branch] master -> master

試したこと

ネットで色々と検索してみたて、どうやら最後に表示されるherokuへのurlが間違っている可能性が高いようなのですが、それなら正しいURLはどこで確認できるのかがわからず、質問させていただきました。
どうかよろしくお願いします。

補足情報(FW/ツールのバージョンなど)

rails 5.1.3 ruby2.6.3

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

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

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

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

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

guest

回答1

0

ベストアンサー

heroku openでアプリが開けなければ、まずデプロイできていないと思います。
urlを変更したい場合は、まずgit remote -vでherokuのアプリのURLを確認して見てください。

urlの変更は、以下のコマンドで実現できます。

git remote set-url heroku 変更するURL

投稿2019/07/15 10:40

bamboo-nova

総合スコア1408

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

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

kingyo0802

2019/07/19 07:03

返信遅れて申し訳ありません。 どうやらデプロイ自体はできていたみたいで、自分がherokuへのURLだと思っていた場所が異なっていたようで 実際には末尾.gitがつくURLではなく、その上の https://enthousiaste-vin-******(伏せ字).herokuapp.com/ が正しいurlだったようです! 回答ありがとうございました!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問