Я пытаюсь развернуть свой бэкэнд API Rails для интерфейса React / Redux на Heroku.Он использует PostgreSQL, ruby 2.6.1 и rails 5.2.2.
После I bundle install
и rake db:migrate
я получаю эту ошибку, когда пытаюсь запустить / получить доступ к серверу.В частности, когда я запускаю rails c
в Heroku CLI.
=> Run `rails server -h` for more startup options
Exiting
Traceback (most recent call last):
97: from /app/bin/rails:9:in `<main>'
96: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
95: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
94: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
93: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
92: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
91: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
90: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
89: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
88: from /app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/commands.rb:18:in `<main>'
87: from /app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/command.rb:46:in `invoke'
86: from /app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/command/base.rb:65:in `perform'
85: from /app/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
84: from /app/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
83: from /app/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
82: from /app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `perform'
81: from /app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `tap'
79: from /app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:53:in `start'
78: from /app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/server.rb:283:in `start'
77: from /app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/server.rb:354:in `wrapped_app'
76: from /app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:27:in `app'
75: from /app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/server.rb:219:in `app'
74: from /app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/server.rb:319:in `build_app_and_options_from_config'
73: from /app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:40:in `parse_file'
72: from /app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:49:in `new_from_string'
71: from /app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:49:in `eval'
70: from config.ru:in `<main>'
69: from config.ru:in `new'
68: from /app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in `initialize'
67: from /app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in `instance_eval'
66: from config.ru:3:in `block in <main>'
65: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `require_relative'
64: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
63: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
62: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
61: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
60: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
59: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
58: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
57: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
56: from /app/config/environment.rb:5:in `<main>'
55: from /app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/application.rb:361:in `initialize!'
54: from /app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/initializable.rb:60:in `run_initializers'
53: from /app/vendor/ruby-2.6.1/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
52: from /app/vendor/ruby-2.6.1/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
51: from /app/vendor/ruby-2.6.1/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
50: from /app/vendor/ruby-2.6.1/lib/ruby/2.6.0/tsort.rb:347:in `call'
49: from /app/vendor/ruby-2.6.1/lib/ruby/2.6.0/tsort.rb:347:in `each'
48: from /app/vendor/ruby-2.6.1/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
47: from /app/vendor/ruby-2.6.1/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
46: from /app/vendor/ruby-2.6.1/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
45: from /app/vendor/ruby-2.6.1/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
44: from /app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/initializable.rb:61:in `block in run_initializers'
43: from /app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `run'
42: from /app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `instance_exec'
41: from /app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
40: from /app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/application/finisher.rb:69:in `each'
39: from /app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/engine.rb:356:in `eager_load!'
38: from /app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/engine.rb:475:in `eager_load!'
37: from /app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/engine.rb:475:in `each'
36: from /app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/engine.rb:477:in `block in eager_load!'
35: from /app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/engine.rb:477:in `each'
34: from /app/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/engine.rb:478:in `block (2 levels) in eager_load!'
33: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:246:in `require_dependency'
32: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/active_support.rb:85:in `depend_on'
31: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:334:in `depend_on'
30: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/active_support.rb:47:in `require_or_load'
29: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/active_support.rb:16:in `allow_bootsnap_retry'
28: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/active_support.rb:48:in `block in require_or_load'
27: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:356:in `require_or_load'
26: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:37:in `load_interlock'
25: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies/interlock.rb:13:in `loading'
24: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/concurrency/share_lock.rb:151:in `exclusive'
23: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies/interlock.rb:14:in `block in loading'
22: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:37:in `block in load_interlock'
21: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:378:in `block in require_or_load'
20: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
19: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
18: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
17: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
16: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
15: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
14: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
13: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
12: from /app/vendor/bundle/ruby/2.6.0/gems/activestorage-5.2.3/app/models/active_storage/blob.rb:16:in `<main>'
11: from /app/vendor/bundle/ruby/2.6.0/gems/activestorage-5.2.3/app/models/active_storage/blob.rb:235:in `<class:Blob>'
10: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
9: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:51:in `each'
8: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
7: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
6: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
5: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
4: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:71:in `instance_eval'
3: from /app/vendor/bundle/ruby/2.6.0/gems/activestorage-5.2.3/lib/active_storage/engine.rb:95:in `block (2 levels) in <class:Engine>'
2: from /app/vendor/ruby-2.6.1/lib/ruby/2.6.0/erb.rb:901:in `result'
1: from /app/vendor/ruby-2.6.1/lib/ruby/2.6.0/erb.rb:901:in `eval'
(erb):12:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError)
Я также получаю эту ошибку в своих журналах CLI Heroku
2019-04-19T03:52:54.946896+00:00 heroku[run.2420]: Starting process with command `bundle exec rake db:migrate`
2019-04-19T03:52:55.001161+00:00 heroku[run.2420]: State changed from starting to up
2019-04-19T03:53:02.369078+00:00 heroku[run.2420]: State changed from up to complete
2019-04-19T03:53:02.351669+00:00 heroku[run.2420]: Process exited with status 0
2019-04-19T03:53:08.251159+00:00 app[api]: Starting process with command `rails s` by user elizabethlemk@yahoo.com
2019-04-19T03:53:10.830564+00:00 heroku[run.2729]: Awaiting client
2019-04-19T03:53:10.890065+00:00 heroku[run.2729]: State changed from starting to up
2019-04-19T03:53:10.955220+00:00 heroku[run.2729]: Starting process with command `rails s`
2019-04-19T03:53:17.287159+00:00 heroku[run.2729]: State changed from up to complete
2019-04-19T03:53:17.270030+00:00 heroku[run.2729]: Process exited with status 1
2019-04-19T04:08:25.604950+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=project-book-back.herokuapp.com request_id=b9658e74-698d-4c28-a43d-de699950ef93 fwd="66.108.46.169" dyno= connect= service= status=503 bytes= protocol=https
2019-04-19T04:08:25.901136+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=project-book-back.herokuapp.com request_id=4bcd81c9-e719-48fd-a952-cd0512d523b0 fwd="66.108.46.169" dyno= connect= service= status=503 bytes= protocol=https
2019-04-19T04:09:53.620428+00:00 app[api]: Starting process with command `rails c` by user elizabethlemk@yahoo.com
2019-04-19T04:09:56.817825+00:00 heroku[run.9739]: Awaiting client
2019-04-19T04:09:56.918943+00:00 heroku[run.9739]: State changed from starting to up
2019-04-19T04:09:56.881249+00:00 heroku[run.9739]: Starting process with command `rails c`
2019-04-19T04:10:03.985498+00:00 heroku[run.9739]: State changed from up to complete
2019-04-19T04:10:03.960627+00:00 heroku[run.9739]: Process exited with status 1
Есть идеи, что может быть не так?
это мой гемфайл
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.6.1'
gem 'rails', '~> 5.2.2', '>= 5.2.2.1'
gem 'pg', '>= 0.18', '< 2.0'
gem 'puma', '~> 3.11'
gem 'bcrypt', '~> 3.1.7'
gem 'active_model_serializers', '~> 0.10.0'
gem "jwt", "~> 2.1"
gem "aws-sdk-s3", require: false
gem 'bootsnap', '>= 1.1.0', require: false
gem 'rack-cors'
group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]