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

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

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

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

Heroku

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

Q&A

1回答

2182閲覧

herokuでのrailsアプリケーションのデプロイができません

ogu_6

総合スコア4

Ruby on Rails 5

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

Heroku

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

0グッド

0クリップ

投稿2018/10/06 02:52

前提・実現したいこと

rails5でアプリケーションを作成しています。
プロトタイプが完成したのでherokuへデプロイしたのですが、
アクセスしてもうまく表示がされず、下記のような表示になります。

どうすればデプロイしたアプリケーションがうまく表示されるのでしょうか?

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

アプリケーションアクセス時の画面

該当のソースコード

herokuのログは以下になります。

heroku

1 2remote: Compressing source files... done. 3remote: Building source: 4remote: 5remote: -----> Ruby app detected 6remote: -----> Compiling Ruby/Rails 7remote: -----> Using Ruby version: ruby-2.5.1 8remote: -----> Installing dependencies using bundler 1.15.2 9remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment 10remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.2). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`. 11remote: Fetching gem metadata from https://rubygems.org/......... 12remote: Fetching version metadata from https://rubygems.org/.. 13remote: Fetching dependency metadata from https://rubygems.org/. 14remote: Using rake 12.3.1 15remote: Using concurrent-ruby 1.0.5 16remote: Using minitest 5.11.3 17remote: Using thread_safe 0.3.6 18remote: Using builder 3.2.3 19remote: Using erubi 1.7.1 20remote: Using mini_portile2 2.3.0 21remote: Using crass 1.0.4 22remote: Using rack 2.0.5 23remote: Using nio4r 2.3.1 24remote: Using websocket-extensions 0.1.3 25remote: Using mini_mime 1.0.1 26remote: Using arel 9.0.0 27remote: Using mimemagic 0.3.2 28remote: Using msgpack 1.2.4 29remote: Using bundler 1.15.2 30remote: Using coffee-script-source 1.12.2 31remote: Using execjs 2.7.0 32remote: Using method_source 0.9.0 33remote: Using thor 0.20.0 34remote: Using ffi 1.9.25 35remote: Using multi_json 1.13.1 36remote: Using pg 1.1.3 37remote: Using puma 3.12.0 38remote: Fetching rails_serve_static_assets 0.0.5 39remote: Fetching rails_stdout_logging 0.0.5 40remote: Using rb-fsevent 0.10.3 41remote: Using tilt 2.0.8 42remote: Using turbolinks-source 5.2.0 43remote: Using i18n 1.1.0 44remote: Using tzinfo 1.2.5 45remote: Using nokogiri 1.8.4 46remote: Using websocket-driver 0.7.0 47remote: Using mail 2.7.0 48remote: Using marcel 0.3.3 49remote: Using bootsnap 1.3.2 50remote: Using rack-test 1.1.0 51remote: Using sprockets 3.7.2 52remote: Using uglifier 4.1.19 53remote: Using coffee-script 2.4.1 54remote: Using rb-inotify 0.9.10 55remote: Using turbolinks 5.2.0 56remote: Using activesupport 5.2.1 57remote: Using loofah 2.2.2 58remote: Using sass-listen 4.0.0 59remote: Using rails-dom-testing 2.0.3 60remote: Using globalid 0.4.1 61remote: Using activemodel 5.2.1 62remote: Using jbuilder 2.7.0 63remote: Using rails-html-sanitizer 1.0.4 64remote: Using sass 3.6.0 65remote: Using activejob 5.2.1 66remote: Using activerecord 5.2.1 67remote: Using actionview 5.2.1 68remote: Using actionpack 5.2.1 69remote: Using actioncable 5.2.1 70remote: Using actionmailer 5.2.1 71remote: Using activestorage 5.2.1 72remote: Using railties 5.2.1 73remote: Using sprockets-rails 3.2.1 74remote: Using coffee-rails 4.2.2 75remote: Using rails 5.2.1 76remote: Using sass-rails 5.0.7 77remote: Installing rails_stdout_logging 0.0.5 78remote: Installing rails_serve_static_assets 0.0.5 79remote: Fetching rails_12factor 0.0.3 80remote: Installing rails_12factor 0.0.3 81remote: Bundle complete! 20 Gemfile dependencies, 64 gems now installed. 82remote: Gems in the groups development and test were not installed. 83remote: Bundled gems are installed into ./vendor/bundle. 84remote: Bundle completed (3.57s) 85remote: Cleaning up the bundler cache. 86remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.2). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`. 87remote: The latest bundler is 1.17.0.pre.1, but you are currently running 1.15.2. 88remote: To update, run `gem install bundler --pre` 89remote: -----> Installing node-v8.10.0-linux-x64 90remote: -----> Detecting rake tasks 91remote: -----> Preparing app for Rails asset pipeline 92remote: Running: rake assets:precompile 93remote: Yarn executable was not detected in the system. 94remote: Download Yarn at https://yarnpkg.com/en/docs/install 95remote: Asset precompilation completed (1.21s) 96remote: Cleaning assets 97remote: Running: rake assets:clean 98remote: -----> Detecting rails configuration 99remote: 100remote: ###### WARNING: 101remote: 102remote: You set your `config.active_storage.service` to :local in production. 103remote: If you are uploading files to this app, they will not persist after the app 104remote: is restarted, on one-off dynos, or if the app has multiple dynos. 105remote: Heroku applications have an ephemeral file system. To 106remote: persist uploaded files, please use a service such as S3 and update your Rails 107remote: configuration. 108remote: 109remote: For more information can be found in this article: 110remote: https://devcenter.heroku.com/articles/active-storage-on-heroku 111remote: 112remote: 113remote: ###### WARNING: 114remote: 115remote: We detected that some binary dependencies required to 116remote: use all the preview features of Active Storage are not 117remote: present on this system. 118remote: 119remote: For more information please see: 120remote: https://devcenter.heroku.com/articles/active-storage-on-heroku 121remote: 122remote: 123remote: ###### WARNING: 124remote: 125remote: No Procfile detected, using the default web server. 126remote: We recommend explicitly declaring how to boot your server process via a Procfile. 127remote: https://devcenter.heroku.com/articles/ruby-default-web-server 128remote: 129remote: 130remote: -----> Discovering process types 131remote: Procfile declares types -> (none) 132remote: Default types for buildpack -> console, rake, web, worker 133remote: 134remote: -----> Compressing... 135remote: Done: 57.7M 136remote: -----> Launching... 137remote: Released v7 138remote: https://xxxxxxx-prototype.herokuapp.com/ deployed to Heroku 139remote: 140remote: Verifying deploy... done. 141To https://git.heroku.com/xxxxxxx-prototype.git 142 d720451..4a6b0c1 master -> master 143xxxxxxx-Pro:xxxxxxx_prototype xxxxxxx$ heroku run rails db:migrate 144 145 146 147 148### 試したこと 149 150データベースもheroku用に変更しており、デプロイ自体は一応完了できます。

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

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

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

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

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

退会済みユーザー

退会済みユーザー

2018/10/06 03:16

ローカル環境では動作するんですか?
ogu_6

2018/10/06 03:17

コメントありがとうございます。ローカル環境では問題なく動作します!
退会済みユーザー

退会済みユーザー

2018/10/06 03:18

とりあえずWarningのところをそれぞれ解決してみてはどうですかね?
ogu_6

2018/10/06 03:20

自分の力量で解決できるかが怪しいのですが、とりあえずはそこですよね..... ありがとうございます!
guest

回答1

0

push時のログにあるWarninigに関しては警告となりますので一旦無視して良いです。

ログの最終行近くに remote: Verifying deploy... done. と出ていますのでデプロイはできていると思います。

マイグレーションが通ったかどうかはこちらの情報では確認できませんが、通ったものとしてエラーはHerokuのログを確認してみてください。

heroku logs -t

本番環境ではセキュリティ上の理由により詳細なエラーが出ませんから、ログを確認していくことになります。

投稿2019/03/18 23:31

ykp_yk

総合スコア654

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

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

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

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

ただいまの回答率
85.50%

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

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

質問する

関連した質問