Rails 5 生产错误 activesupport

Rails 5 production error activesupport

我有一个 5.0.0.1 项目在部署时遇到问题。我使用 capistrano 进行部署,它 运行s puma 也适合我。 puma 得到 运行 并且出现 "Somthing went wrong" 错误。
现在我在本地开发中遇到问题 运行ning 项目,很奇怪!出现此错误:‍‍You have already activated activesupport 5.1.2, but your Gemfile requires activesupport 5.0.0.1. Prepending bundle exec to your command may solve this. (Gem::LoadError) 是的,我只能 运行 在本地使用 bundle exec rails s 投影。
我尝试过的事情:
1.清除Gemfile.lockbundle updatebundle install
2. 卸载 5.1.2 并且它抱怨你没有 5.1.2
3. 因为我正在使用 git,所以我回到了一个我确信它有效的提交。什么都没有!
4. 尝试将 Activesupport 5.1.2 & 5.0.0.1 添加到 gemfile。没有
5. 将 rails 版本更改为较新的版本(实际上不能转到 5.1 因为弃用警告)
6. 检查 Gemfile.lock,我到处都看到 Activesupport,它的 5.0.0.1 或类似 >=4


求制作错误:
1。已编辑

sudo tail production.log
F, [2017-08-09T00:32:34.086476 #14010] FATAL -- : rack (2.0.3) lib/rack/runtime.rb:22:in `call'
F, [2017-08-09T00:32:34.086508 #14010] FATAL -- : activesupport (5.0.0.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
F, [2017-08-09T00:32:34.086551 #14010] FATAL -- : actionpack (5.0.0.1) lib/action_dispatch/middleware/executor.rb:12:in `call'
F, [2017-08-09T00:32:34.086586 #14010] FATAL -- : rack (2.0.3) lib/rack/sendfile.rb:111:in `call'
F, [2017-08-09T00:32:34.086619 #14010] FATAL -- : railties (5.0.0.1) lib/rails/engine.rb:522:in `call'
F, [2017-08-09T00:32:34.086651 #14010] FATAL -- : puma (3.4.0) lib/puma/configuration.rb:224:in `call'
F, [2017-08-09T00:32:34.086710 #14010] FATAL -- : puma (3.4.0) lib/puma/server.rb:569:in `handle_request'
F, [2017-08-09T00:32:34.086772 #14010] FATAL -- : puma (3.4.0) lib/puma/server.rb:406:in `process_client'
F, [2017-08-09T00:32:34.086808 #14010] FATAL -- : puma (3.4.0) lib/puma/server.rb:271:in `block in run'
F, [2017-08-09T00:32:34.086841 #14010] FATAL -- : puma (3.4.0) lib/puma/thread_pool.rb:114:in `block in spawn_thread'
I, [2017-08-09T00:33:50.110563 #14010]  INFO -- : Started GET "/" for 2.177.64.100 at 2017-08-09 00:33:50 +0430
I, [2017-08-09T00:33:50.113789 #14010]  INFO -- : Processing by StaticPagesController#home as HTML
I, [2017-08-09T00:33:50.115162 #14010]  INFO -- :   Rendering static_pages/home.html.erb within layouts/application
I, [2017-08-09T00:33:50.116416 #14010]  INFO -- :   Rendered static_pages/_non_logged_in_home.html.erb (0.9ms)
I, [2017-08-09T00:33:50.116508 #14010]  INFO -- :   Rendered static_pages/home.html.erb within layouts/application (1.3ms)
I, [2017-08-09T00:33:50.117616 #14010]  INFO -- :   Rendered layouts/_shim.html.erb (0.0ms)
I, [2017-08-09T00:33:50.118101 #14010]  INFO -- :   Rendered layouts/_header.html.erb (0.3ms)
I, [2017-08-09T00:33:50.118863 #14010]  INFO -- :   Rendered layouts/_footer.html.erb (0.6ms)
I, [2017-08-09T00:33:50.119039 #14010]  INFO -- : Completed 200 OK in 5ms (Views: 4.3ms | ActiveRecord: 0.0ms)
F, [2017-08-09T00:33:50.120949 #14010] FATAL -- :   
F, [2017-08-09T00:33:50.121013 #14010] FATAL -- : ArgumentError (key must be 32 bytes):
F, [2017-08-09T00:33:50.121047 #14010] FATAL -- :   
F, [2017-08-09T00:33:50.121076 #14010] FATAL -- : activesupport (5.0.0.1) lib/active_support/message_encryptor.rb:72:in `key='
F, [2017-08-09T00:33:50.121112 #14010] FATAL -- : activesupport (5.0.0.1) lib/active_support/message_encryptor.rb:72:in `_encrypt'
F, [2017-08-09T00:33:50.121149 #14010] FATAL -- : activesupport (5.0.0.1) lib/active_support/message_encryptor.rb:58:in `encrypt_and_sign'
F, [2017-08-09T00:33:50.121177 #14010] FATAL -- : actionpack (5.0.0.1) lib/action_dispatch/middleware/cookies.rb:592:in `commit'
F, [2017-08-09T00:33:50.121203 #14010] FATAL -- : actionpack (5.0.0.1) lib/action_dispatch/middleware/cookies.rb:465:in `[]='
F, [2017-08-09T00:33:50.121229 #14010] FATAL -- : actionpack (5.0.0.1) lib/action_dispatch/middleware/session/cookie_store.rb:117:in `set_cookie'
F, [2017-08-09T00:33:50.121263 #14010] FATAL -- : rack (2.0.3) lib/rack/session/abstract/id.rb:363:in `commit_session'
F, [2017-08-09T00:33:50.121291 #14010] FATAL -- : rack (2.0.3) lib/rack/session/abstract/id.rb:234:in `context'
F, [2017-08-09T00:33:50.121316 #14010] FATAL -- : rack (2.0.3) lib/rack/session/abstract/id.rb:226:in `call'
F, [2017-08-09T00:33:50.121341 #14010] FATAL -- : actionpack (5.0.0.1) lib/action_dispatch/middleware/cookies.rb:613:in `call'
F, [2017-08-09T00:33:50.121381 #14010] FATAL -- : actionpack (5.0.0.1) lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
F, [2017-08-09T00:33:50.121424 #14010] FATAL -- : activesupport (5.0.0.1) lib/active_support/callbacks.rb:97:in `__run_callbacks__'
F, [2017-08-09T00:33:50.121453 #14010] FATAL -- : activesupport (5.0.0.1) lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
F, [2017-08-09T00:33:50.121479 #14010] FATAL -- : activesupport (5.0.0.1) lib/active_support/callbacks.rb:90:in `run_callbacks'
F, [2017-08-09T00:33:50.121505 #14010] FATAL -- : actionpack (5.0.0.1) lib/action_dispatch/middleware/callbacks.rb:36:in `call'
F, [2017-08-09T00:33:50.121544 #14010] FATAL -- : actionpack (5.0.0.1) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
F, [2017-08-09T00:33:50.121571 #14010] FATAL -- : actionpack (5.0.0.1) lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
F, [2017-08-09T00:33:50.121622 #14010] FATAL -- : actionpack (5.0.0.1) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
F, [2017-08-09T00:33:50.121650 #14010] FATAL -- : railties (5.0.0.1) lib/rails/rack/logger.rb:36:in `call_app'
F, [2017-08-09T00:33:50.121676 #14010] FATAL -- : railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `block in call'
F, [2017-08-09T00:33:50.121709 #14010] FATAL -- : activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `block in tagged'
F, [2017-08-09T00:33:50.121756 #14010] FATAL -- : activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:26:in `tagged'
F, [2017-08-09T00:33:50.121791 #14010] FATAL -- : activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `tagged'
F, [2017-08-09T00:33:50.121821 #14010] FATAL -- : railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `call'
F, [2017-08-09T00:33:50.121847 #14010] FATAL -- : actionpack (5.0.0.1) lib/action_dispatch/middleware/request_id.rb:24:in `call'
F, [2017-08-09T00:33:50.121879 #14010] FATAL -- : rack (2.0.3) lib/rack/method_override.rb:22:in `call'
F, [2017-08-09T00:33:50.121908 #14010] FATAL -- : rack (2.0.3) lib/rack/runtime.rb:22:in `call'
F, [2017-08-09T00:33:50.121934 #14010] FATAL -- : activesupport (5.0.0.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
F, [2017-08-09T00:33:50.121959 #14010] FATAL -- : actionpack (5.0.0.1) lib/action_dispatch/middleware/executor.rb:12:in `call'
F, [2017-08-09T00:33:50.121993 #14010] FATAL -- : rack (2.0.3) lib/rack/sendfile.rb:111:in `call'
F, [2017-08-09T00:33:50.122020 #14010] FATAL -- : railties (5.0.0.1) lib/rails/engine.rb:522:in `call'
F, [2017-08-09T00:33:50.122046 #14010] FATAL -- : puma (3.4.0) lib/puma/configuration.rb:224:in `call'
F, [2017-08-09T00:33:50.122070 #14010] FATAL -- : puma (3.4.0) lib/puma/server.rb:569:in `handle_request'
F, [2017-08-09T00:33:50.122095 #14010] FATAL -- : puma (3.4.0) lib/puma/server.rb:406:in `process_client'
F, [2017-08-09T00:33:50.122126 #14010] FATAL -- : puma (3.4.0) lib/puma/server.rb:271:in `block in run'
F, [2017-08-09T00:33:50.122154 #14010] FATAL -- : puma (3.4.0) lib/puma/thread_pool.rb:114:in `block in spawn_thread'

2.

bundle exec puma -e production -w 1 -b unix:///tmp/m.sock
[22429] Puma starting in cluster mode...
[22429] * Version 3.4.0 (ruby 2.4.1-p111), codename: Owl Bowl Brawl
[22429] * Min threads: 5, max threads: 5
[22429] * Environment: production
[22429] * Process workers: 1
[22429] * Preloading application
/home/deploy/m/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.0.1/lib/active_support/xml_mini.rb:51: warning: constant ::Fixnum is deprecated
/home/deploy/m/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.0.1/lib/active_support/xml_mini.rb:52: warning: constant ::Bignum is deprecated
DEPRECATION WARNING:config.serve_static_filesis deprecated and will be removed in Rails 5.1.
Please useconfig.public_file_server.enabled = falseinstead.
(called from block in <top (required)> at /home/deploy/m/releases/20170807074848/config/environments/production.rb:25)
/home/deploy/m/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.0.1/lib/active_support/core_ext/numeric/conversions.rb:138: warning: constant ::Fixnum is deprecated
[22429] * Listening on unix:///tmp/m.sock
[22429] Use Ctrl-C to stop
[22429] - Worker 0 (pid: 22458) booted, phase: 0 

3.

sudo tail puma_error.log
puma (3.4.0) lib/puma/server.rb:569:inhandle_request'
puma (3.4.0) lib/puma/server.rb:406:in process_client'
puma (3.4.0) lib/puma/server.rb:271:inblock in run'
puma (3.4.0) lib/puma/thread_pool.rb:114:in block in spawn_thread'
[18099] Early termination of worker
[18102] ! Detected parent died, dying
=== puma startup: 2017-08-07 12:20:28 +0430 ===
[22077] - Worker 0 (pid: 22080) booted, phase: 0
[22077] Early termination of worker
[22080] ! Detected parent died, dying

Gemfile:

`source 'https://rubygems.org'

gem 'rails', '5.0.0.1'
gem 'bcrypt', '3.1.11'
gem 'faker', '1.6.6'
gem 'carrierwave', '0.11.2'
gem 'mini_magick', '4.5.1'
gem 'fog', '1.38.0'
gem 'will_paginate', '3.1.5'
gem 'bootstrap-will_paginate', '1.0.0'
gem 'bootstrap-sass', '3.3.6'

gem 'sass-rails', '5.0.6'
gem 'uglifier', '3.0.0'
gem 'coffee-rails', '4.2.1'
gem 'jquery-rails', '4.1.1'
gem 'turbolinks', '5.0.1'
gem 'jbuilder', '2.4.1'
gem 'sdoc', '0.4.0', group: :doc

group :development do
gem 'sqlite3', '1.3.12'
gem 'byebug', '9.0.0', platform: :mri
gem 'web-console', '>= 3.1.1'
gem 'capistrano', '~> 3.7', '>= 3.7.1'
gem 'capistrano-rails', '~> 1.2'
gem 'capistrano3-puma'
gem 'capistrano-rbenv', '~> 2.1'
gem 'capistrano-nginx'
gem 'capistrano-rails-db'
gem 'capistrano-rails-console'
gem 'capistrano-upload-config'
gem 'sshkit-sudo'
end

group :development, :test do
gem 'listen', '3.0.8'
gem 'spring', '1.7.2'
gem 'spring-watcher-listen', '2.0.0'
end

group :test do
gem 'rails-controller-testing', '0.1.1'
gem 'minitest-reporters', '1.1.9'
gem 'guard', '2.13.0'
gem 'guard-minitest', '2.4.4'
end

group :production do
gem 'pg', '0.18.4'
gem 'rails_12factor', '0.0.2'
gem 'puma', '3.4.0'
end
`

这是一个常见的错误。我从 Here
修复了它 将 rails 版本从 5.0.0.1 更改为 5.0.1
不幸的是,我仍然必须 bundle exec rails s 用于本地(而且我认为它在生产中也不起作用,所以我之前只是忽略了它)。
但是现在生产运行起来没有任何错误。