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

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回答

9447閲覧

HerokuにデプロイするとMethod Not Allowedが出力される

tmk_0613

総合スコア17

Heroku

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

Ruby on Rails

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

2グッド

2クリップ

投稿2017/08/15 11:18

編集2017/08/15 11:47

Ruby on Rails チュートリアルの1章を進めています。

デプロイまではできたのですが、heroku createにより生成されたURLをクリックしても

Method Not Allowed

と出力されてしまいます。(本来はHello,world!)
コードをコピペして再デプロイしても同じ結果になってしまい解決できず、困っております。

開発環境はcloud9です。

以下pushした際のlog

tmk0613:~/workspace/hello_app (master) $ git push heroku master Counting objects: 102, done. Delta compression using up to 8 threads. Compressing objects: 100% (88/88), done. Writing objects: 100% (102/102), 21.50 KiB | 0 bytes/s, done. Total 102 (delta 13), 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.3.4 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.15.3). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`. remote: Fetching gem metadata from https://rubygems.org/......... remote: Fetching version metadata from https://rubygems.org/.. remote: Fetching dependency metadata from https://rubygems.org/. remote: Fetching rake 12.0.0 remote: Fetching concurrent-ruby 1.0.5 remote: Fetching i18n 0.8.6 remote: Installing i18n 0.8.6 remote: Installing rake 12.0.0 remote: Installing concurrent-ruby 1.0.5 remote: Fetching minitest 5.10.3 remote: Fetching thread_safe 0.3.6 remote: Installing minitest 5.10.3 remote: Installing thread_safe 0.3.6 remote: Fetching builder 3.2.3 remote: Installing builder 3.2.3 remote: Fetching erubi 1.6.1 remote: Installing erubi 1.6.1 remote: Fetching mini_portile2 2.2.0 remote: Fetching rack 2.0.3 remote: Fetching nio4r 2.1.0 remote: Installing mini_portile2 2.2.0 remote: Installing nio4r 2.1.0 with native extensions remote: Fetching websocket-extensions 0.1.2 remote: Installing rack 2.0.3 remote: Installing websocket-extensions 0.1.2 remote: Fetching mime-types-data 3.2016.0521 remote: Installing mime-types-data 3.2016.0521 remote: Fetching arel 8.0.0 remote: Installing arel 8.0.0 remote: Using bundler 1.15.2 remote: Fetching coffee-script-source 1.12.2 remote: Installing coffee-script-source 1.12.2 remote: Fetching execjs 2.7.0 remote: Installing execjs 2.7.0 remote: Fetching method_source 0.8.2 remote: Fetching thor 0.19.4 remote: Installing method_source 0.8.2 remote: Installing thor 0.19.4 remote: Fetching ffi 1.9.18 remote: Fetching multi_json 1.12.1 remote: Installing multi_json 1.12.1 remote: Fetching pg 0.20.0 remote: Installing pg 0.20.0 with native extensions remote: Installing ffi 1.9.18 with native extensions remote: Fetching puma 3.9.1 remote: Installing puma 3.9.1 with native extensions remote: Fetching rb-fsevent 0.10.2 remote: Installing rb-fsevent 0.10.2 remote: Fetching tilt 2.0.8 remote: Installing tilt 2.0.8 remote: Fetching turbolinks-source 5.0.3 remote: Installing turbolinks-source 5.0.3 remote: Fetching tzinfo 1.2.3 remote: Installing tzinfo 1.2.3 remote: Fetching nokogiri 1.8.0 remote: Installing nokogiri 1.8.0 with native extensions remote: Fetching websocket-driver 0.6.5 remote: Installing websocket-driver 0.6.5 with native extensions remote: Fetching mime-types 3.1 remote: Installing mime-types 3.1 remote: Fetching rack-test 0.6.3 remote: Installing rack-test 0.6.3 remote: Fetching sprockets 3.7.1 remote: Installing sprockets 3.7.1 remote: Fetching coffee-script 2.4.1 remote: Installing coffee-script 2.4.1 remote: Fetching uglifier 3.2.0 remote: Installing uglifier 3.2.0 remote: Fetching turbolinks 5.0.1 remote: Installing turbolinks 5.0.1 remote: Fetching activesupport 5.1.2 remote: Installing activesupport 5.1.2 remote: Fetching rb-inotify 0.9.10 remote: Installing rb-inotify 0.9.10 remote: Fetching mail 2.6.6 remote: Installing mail 2.6.6 remote: Fetching globalid 0.4.0 remote: Installing globalid 0.4.0 remote: Fetching activemodel 5.1.2 remote: Installing activemodel 5.1.2 remote: Fetching jbuilder 2.7.0 remote: Installing jbuilder 2.7.0 remote: Fetching sass-listen 4.0.0 remote: Installing sass-listen 4.0.0 remote: Fetching activejob 5.1.2 remote: Installing activejob 5.1.2 remote: Fetching activerecord 5.1.2 remote: Installing activerecord 5.1.2 remote: Fetching sass 3.5.1 remote: Installing sass 3.5.1 remote: Fetching rails-dom-testing 2.0.3 remote: Fetching loofah 2.0.3 remote: Installing rails-dom-testing 2.0.3 remote: Installing loofah 2.0.3 remote: Fetching rails-html-sanitizer 1.0.3 remote: Installing rails-html-sanitizer 1.0.3 remote: Fetching actionview 5.1.2 remote: Installing actionview 5.1.2 remote: Fetching actionpack 5.1.2 remote: Installing actionpack 5.1.2 remote: Fetching actioncable 5.1.2 remote: Fetching actionmailer 5.1.2 remote: Fetching railties 5.1.2 remote: Installing actionmailer 5.1.2 remote: Installing actioncable 5.1.2 remote: Installing railties 5.1.2 remote: Fetching sprockets-rails 3.2.0 remote: Installing sprockets-rails 3.2.0 remote: Fetching coffee-rails 4.2.2 remote: Fetching jquery-rails 4.3.1 remote: Fetching rails 5.1.2 remote: Installing coffee-rails 4.2.2 remote: Installing rails 5.1.2 remote: Fetching sass-rails 5.0.6 remote: Installing sass-rails 5.0.6 remote: Installing jquery-rails 4.3.1 remote: Bundle complete! 16 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: The latest bundler is 1.15.3, but you are currently running 1.15.2. remote: To update, run `gem install bundler` remote: Bundle completed (29.14s) remote: Cleaning up the bundler cache. remote: -----> Installing node-v6.11.1-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, [2017-08-15T09:05:57.803687 #1467] INFO -- : Writing /tmp/build_077696a391a55490f9de0b50c2b507c1/public/assets/application-2f609bb1a2cc752f8811bd5a02e6a271dcbbeb0b61377bb4f7f8126b9c54cc49.js remote: I, [2017-08-15T09:05:57.804460 #1467] INFO -- : Writing /tmp/build_077696a391a55490f9de0b50c2b507c1/public/assets/application-2f609bb1a2cc752f8811bd5a02e6a271dcbbeb0b61377bb4f7f8126b9c54cc49.js.gz remote: I, [2017-08-15T09:05:57.812627 #1467] INFO -- : Writing /tmp/build_077696a391a55490f9de0b50c2b507c1/public/assets/application-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css remote: I, [2017-08-15T09:05:57.812754 #1467] INFO -- : Writing /tmp/build_077696a391a55490f9de0b50c2b507c1/public/assets/application-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css.gz remote: Asset precompilation completed (3.12s) remote: Cleaning assets remote: Running: rake assets:clean remote: remote: ###### WARNING: 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.3.4' remote: # See https://devcenter.heroku.com/articles/ruby-versions for more information. remote: remote: ###### WARNING: 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: -----> Discovering process types remote: Procfile declares types -> (none) remote: Default types for buildpack -> console, rake, web, worker remote: remote: -----> Compressing... remote: Done: 37.1M remote: -----> Launching... remote: Released v5 remote: https://~/ deployed to Heroku remote: remote: Verifying deploy... done. To https://git.heroku.com/~ * [new branch] master -> master
Lichtenstein, saitou311099👍を押しています

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

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

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

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

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

tsuemura

2017/08/15 11:45

ログにURLが載っていますので、質問を削除するか、heroku renameで変更することをおすすめします。
tsuemura

2017/08/15 11:45

「クリックした」とありますが、普通にブラウザで開いてますか?それとも、curlなどでURLを叩いたりしていますか?
tmk_0613

2017/08/15 11:48

URLは修正致しました。ありがとうございます。
tmk_0613

2017/08/15 11:53 編集

左クリックからOpenしています。
tmk_0613

2017/08/15 11:53

解決致しました。ご協力ありがとうございました。
tsuemura

2017/08/15 11:54

Teratailは質問の編集履歴を見ることができます。絶対にバレたくないURLでしたら、質問の削除か、heroku renameすることをおすすめします。また、このURLで普通にhello,worldが表示されています。ブラウザで開いていますか?それとも、Cloud9のプレビューなどで開いていますか?
tmk_0613

2017/08/15 11:57

そうでしたか、ご親切にありがとうございます!heroku renameしておきます。また質問についてですが、開くURLを勘違いしておりました。ご協力ありがとうございました!
tsuemura

2017/08/15 12:04

解決したようで何よりです。Railsチュートリアル、結構大変ですがとても勉強になりますので、ぜひ挫折せず最後までやりきってくださいね。
guest

回答1

0

自己解決

自己解決致しました。

https://git.heroku.com/~~.git

を今までOpenしていたのですが、

https://obscure~.herokuapp.com/

から開いたらHello,World!と出力されました。

投稿2017/08/15 11:52

tmk_0613

総合スコア17

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問