前提・実現したいこと
Railsチュートリアル1章の演習です。herokuにデプロイしたいです。
Railsチュートリアル1章の最後でherokuにデプロイできないので、できるようにするにはどうすればいいのか知りたいです
■■な機能を実装中に以下のエラーメッセージが発生しました。
Ruby on Rails ```ここに言語を入力 ソースコード 怪しいメッセージが出されたところを記載します。
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.3
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
.
remote: -----> Installing node-v10.14.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, [2019-04-02T06:34:46.302265 #1092] INFO -- : Writing /tmp/build_c9e78c29be5119b7644ba4a3951999d9/public/assets/application-7e084e44b9a13db0cda25bad2ac6fdbbfe31462ec93176e245cd0bcbc079f436.js
remote: I, [2019-04-02T06:34:46.302676 #1092] INFO -- : Writing /tmp/build_c9e78c29be5119b7644ba4a3951999d9/public/assets/application-7e084e44b9a13db0cda25bad2ac6fdbbfe31462ec93176e245cd0bcbc079f436.js.gz
remote: I, [2019-04-02T06:34:46.309277 #1092] INFO -- : Writing /tmp/build_c9e78c29be5119b7644ba4a3951999d9/public/assets/application-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css
remote: I, [2019-04-02T06:34:46.309936 #1092] INFO -- : Writing /tmp/build_c9e78c29be5119b7644ba4a3951999d9/public/assets/application-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css.gz
remote: Asset precompilation completed (2.77s)
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.3'
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: 33.8M
remote: -----> Launching...
remote: Released v4
remote: https://cherry-pudding-18708.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/cherry-pudding-18708.git
- [new branch] master -> master
### 問題に対して試したこと 『https://cherry-pudding-18708.herokuapp.com/』 にアクセスすると、 『Application error』 という文字が出たので、 『heroku logs --tail』コマンドを実行したところ、
2019-04-02T08:45:11.178789+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=cherry-pudding-18708.herokuapp.com request_id=418c602d-6211-4552-9488-abbfd39fae16 fwd="115.69.237.151" dyno= connect= service= status=503 bytes= protocol=https
2019-04-02T08:45:11.634170+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=cherry-pudding-18708.herokuapp.com request_id=7d395db1-345a-40ad-833c-8e770f0b8b7b fwd="115.69.237.151" dyno= connect= service= status=503 bytes= protocol=https
^C
とErrorの文字が出ました。 ここから先に進めない状態です。 ### 補足情報(FW/ツールのバージョンなど) 一応Gemfileの中身を記載しておきます。
source 'https://rubygems.org'
gem 'rails', '5.1.6'
gem 'puma', '3.9.1'
gem 'sass-rails', '5.0.6'
gem 'uglifier', '3.2.0'
gem 'coffee-rails', '4.2.2'
gem 'jquery-rails', '4.3.1'
gem 'turbolinks', '5.0.1'
gem 'jbuilder', '2.7.0'
group :development, :test do
gem 'sqlite3', '1.3.13'
gem 'byebug', '9.0.6', platform: :mri
end
group :development do
gem 'web-console', '3.5.1'
gem 'listen', '3.1.5'
gem 'spring', '2.0.2'
gem 'spring-watcher-listen', '2.0.1'
end
group :production do
gem 'pg', '0.20.0'
end
Windows環境ではtzinfo-dataというgemを含める必要があります
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]こにより詳細な情報を記載してください。
database.ymlの中身も記載します。
SQLite version 3.x
gem install sqlite3
Ensure the SQLite 3 gem is defined in your Gemfile
gem 'sqlite3'
default: &default
adapter: sqlite3
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000
development:
<<: *default
database: db/development.sqlite3
Warning: The database defined as "test" will be erased and
re-generated from your development database when you run "rake".
Do not set this db to the same as development or production.
test:
<<: *default
database: db/test.sqlite3
production:
<<: *default
database: db/production.sqlite3
他にも載せるべき情報があれば教えていただけると幸いです。 チュートリアルを昨日始めたばかりなので、当たり前のことも分からない状態だと思います。 回答に対して変な質問をしたり、誤った言葉の使い方をしてしまったら、申し訳ありません。
回答1件
あなたの回答
tips
プレビュー