達成したいこと
herokuでデプロイしたアプリを動かしたい
困っていること
一番最初デプロイした時は正常に動いていたが、アプリを改修して再度見てみたら、エラーが出てしまい原因が突き止められないでいる。
$ heroku run rails console
などは正常に起動する。
可能性が考えられる原因などお分かりになる方いたらご教授いただけたらと思います。
実際のエラー文
エラー文、追記しました。
No such file or directory @ rb_sysopen - tmp/pids/server.pid (Errno::ENOENT)
が問題なんだと思うのですが、、、
一応、
/tmp/pids/.keep
/tmp/pids/server.pid
/tmp/sockets
は存在してます。。
2021-05-19T06:58:42.876497+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/puma-3.12.6/lib/puma/launcher.rb:133:in `initialize': No such file or directory @ rb_sysopen - tmp/pids/server.pid (Errno::ENOENT) 2021-05-19T06:58:42.876521+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/puma-3.12.6/lib/puma/launcher.rb:133:in `open' ・・・(略) 2021-05-18T09:43:15.229755+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=frozen-headland-37737.herokuapp.com request_id=9c344d3b-808f-4df8-8943-3c85a65c31b1 fwd="106.171.69.190" dyno= connect= service= status=503 bytes= protocol=https 2021-05-18T09:43:15.929215+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=frozen-headland-37737.herokuapp.com request_id=9020ccfa-4506-46af-ad65-104c89ef24ca fwd="106.171.69.190" dyno= connect= service= status=503 bytes= protocol=https
package.json
{ "name": "next", "private": true, "dependencies": { "serve": "^11.3.2" } }
Gemfile
source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby '2.7.3' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.2.5' # Use Puma as the app server gem 'puma', '~> 3.11' # Use SCSS for stylesheets gem 'sass-rails', '~> 5.0' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0' # See https://github.com/rails/execjs#readme for more supported runtimes # gem 'mini_racer', platforms: :ruby # Use CoffeeScript for .coffee assets and views gem 'coffee-rails', '~> 4.2' # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks gem 'turbolinks', '~> 5' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.5' # Use Redis adapter to run Action Cable in production # gem 'redis', '~> 4.0' # Use ActiveModel has_secure_password gem 'bcrypt', '~> 3.1.7' # Use ActiveStorage variant gem 'mini_magick', '~> 4.8' gem 'carrierwave' # Use Capistrano for deployment # gem 'capistrano-rails', group: :development # Reduces boot times through caching; required in config/boot.rb gem 'bootsnap', '>= 1.1.0', require: false gem 'bootstrap' gem 'jquery-rails' gem 'pry-rails' gem 'mini_racer' gem 'public_uid' gem 'rails-i18n' group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] gem 'sqlite3' end group :development do # Access an interactive console on exception pages or by calling 'console' anywhere in the code. gem 'web-console', '>= 3.3.0' gem 'listen', '>= 3.0.5', '< 3.2' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' gem 'spring-watcher-listen', '~> 2.0.0' end group :test do # Adds support for Capybara system testing and selenium driver gem 'capybara', '>= 2.15' gem 'selenium-webdriver' # Easy installation and use of chromedriver to run system tests with Chrome gem 'chromedriver-helper' gem 'minitest' gem 'minitest-reporters' gem 'guard' gem 'guard-minitest' end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] group :production do gem 'pg' end
Procfile
web: bundle exec puma -C config/puma.rb
puma.rb
workers Integer(ENV['WEB_CONCURRENCY'] || 2) threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5) threads threads_count, threads_count preload_app! rackup DefaultRackup port ENV['PORT'] || 3000 environment ENV['RACK_ENV'] || 'development' on_worker_boot do # Worker specific setup for Rails 4.1+ # See: https://devcenter.heroku.com/articles/ # deploying-rails-applications-with-the-puma-web-server#on-worker-boot ActiveRecord::Base.establish_connection end
database.yml
default: &default adapter: postgresql pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> timeout: 5000 development: <<: *default database: db/development_postgresql test: <<: *default database: db/test_postgresql production: <<: *default database: db/production_postgresql
回答2件
あなたの回答
tips
プレビュー