gpt4 book ai didi

ruby-on-rails - Rails 6 Heroku 设计错误 ActiveSupport::MessageEncryptor::InvalidMessage

转载 作者:行者123 更新时间:2023-12-04 00:57:31 26 4
gpt4 key购买 nike

我正在尝试将我的 Rails 6 应用程序部署到 Heroku,这是我第一次在 Rails 6 位中执行此操作,我从 heroku 获得此输出:

remote: Compressing source files... done.
remote: Building source:
remote:
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: -----> Installing bundler 2.0.2
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.7.1
remote: -----> Installing dependencies using bundler 2.0.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: [DEPRECATED] The `--deployment` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set deployment 'true'`, and stop using this flag
remote: [DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set path 'vendor/bundle'`, and stop using this flag
remote: [DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set without 'development:test'`, and stop using this flag
remote: [DEPRECATED] The --binstubs option will be removed in favor of `bundle binstubs`
remote: The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
remote: Fetching gem metadata from https://rubygems.org/............
remote: Fetching rake 13.0.1
remote: Installing rake 13.0.1
remote: Fetching concurrent-ruby 1.1.6
remote: Fetching minitest 5.14.0
remote: Fetching thread_safe 0.3.6
remote: Installing minitest 5.14.0
remote: Installing thread_safe 0.3.6
remote: Fetching zeitwerk 2.3.0
remote: Installing concurrent-ruby 1.1.6
remote: Installing zeitwerk 2.3.0
remote: Fetching builder 3.2.4
remote: Fetching erubi 1.9.0
remote: Installing builder 3.2.4
remote: Installing erubi 1.9.0
remote: Fetching mini_portile2 2.4.0
remote: Fetching crass 1.0.6
remote: Installing mini_portile2 2.4.0
remote: Installing crass 1.0.6
remote: Fetching rack 2.2.2
remote: Fetching nio4r 2.5.2
remote: Fetching websocket-extensions 0.1.4
remote: Installing nio4r 2.5.2 with native extensions
remote: Installing websocket-extensions 0.1.4
remote: Installing rack 2.2.2
remote: Fetching mimemagic 0.3.4
remote: Installing mimemagic 0.3.4
remote: Fetching mini_mime 1.0.2
remote: Installing mini_mime 1.0.2
remote: Fetching public_suffix 4.0.4
remote: Fetching bcrypt 3.1.13
remote: Installing public_suffix 4.0.4
remote: Installing bcrypt 3.1.13 with native extensions
remote: Fetching msgpack 1.3.3
remote: Installing msgpack 1.3.3 with native extensions
remote: Using bundler 2.1.4
remote: Fetching orm_adapter 0.5.0
remote: Installing orm_adapter 0.5.0
remote: Fetching method_source 1.0.0
remote: Installing method_source 1.0.0
remote: Fetching thor 1.0.1
remote: Installing thor 1.0.1
remote: Fetching devise-bootstrap-views 1.1.0
remote: Installing devise-bootstrap-views 1.1.0
remote: Fetching erubis 2.7.0
remote: Installing erubis 2.7.0
remote: Fetching ffi 1.12.2
remote: Installing ffi 1.12.2 with native extensions
remote: Fetching temple 0.8.2
remote: Installing temple 0.8.2
remote: Fetching tilt 2.0.10
remote: Installing tilt 2.0.10
remote: Fetching sexp_processor 4.14.1
remote: Installing sexp_processor 4.14.1
remote: Fetching htmlentities 4.3.4
remote: Installing htmlentities 4.3.4
remote: Fetching mini_magick 4.10.1
remote: Installing mini_magick 4.10.1
remote: Fetching pg 1.2.3
remote: Installing pg 1.2.3 with native extensions
remote: Fetching redis 4.1.3
remote: Installing redis 4.1.3
remote: Fetching turbolinks-source 5.2.0
remote: Installing turbolinks-source 5.2.0
remote: Fetching tzinfo 1.2.7
remote: Installing tzinfo 1.2.7
remote: Fetching i18n 1.8.2
remote: Installing i18n 1.8.2
remote: Fetching nokogiri 1.10.9
remote: Installing nokogiri 1.10.9 with native extensions
remote: Fetching websocket-driver 0.7.1
remote: Installing websocket-driver 0.7.1 with native extensions
remote: Fetching rack-test 1.1.0
remote: Installing rack-test 1.1.0
remote: Fetching warden 1.2.8
remote: Installing warden 1.2.8
remote: Fetching rack-proxy 0.6.5
remote: Installing rack-proxy 0.6.5
remote: Fetching sprockets 4.0.0
remote: Installing sprockets 4.0.0
remote: Fetching mail 2.7.1
remote: Installing mail 2.7.1
remote: Fetching marcel 0.3.3
remote: Installing marcel 0.3.3
remote: Fetching addressable 2.7.0
remote: Installing addressable 2.7.0
remote: Fetching puma 4.3.3
remote: Installing puma 4.3.3 with native extensions
remote: Fetching haml 5.1.2
remote: Installing haml 5.1.2
remote: Fetching ruby_parser 3.14.2
remote: Installing ruby_parser 3.14.2
remote: Fetching bootsnap 1.4.6
remote: Installing bootsnap 1.4.6 with native extensions
remote: Fetching turbolinks 5.2.1
remote: Installing turbolinks 5.2.1
remote: Fetching activesupport 6.0.2.2
remote: Installing activesupport 6.0.2.2
remote: Fetching ruby-vips 2.0.17
remote: Installing ruby-vips 2.0.17
remote: Fetching sassc 2.2.1
remote: Installing sassc 2.2.1 with native extensions
remote: Fetching css_parser 1.7.1
remote: Installing css_parser 1.7.1
remote: Fetching loofah 2.5.0
remote: Installing loofah 2.5.0
remote: Fetching html2haml 2.2.0
remote: Installing html2haml 2.2.0
remote: Fetching rails-dom-testing 2.0.3
remote: Installing rails-dom-testing 2.0.3
remote: Fetching globalid 0.4.2
remote: Installing globalid 0.4.2
remote: Fetching activemodel 6.0.2.2
remote: Installing activemodel 6.0.2.2
remote: Fetching jbuilder 2.10.0
remote: Installing jbuilder 2.10.0
remote: Fetching image_processing 1.10.3
remote: Installing image_processing 1.10.3
remote: Fetching premailer 1.11.1
remote: Installing premailer 1.11.1
remote: Fetching rails-html-sanitizer 1.3.0
remote: Installing rails-html-sanitizer 1.3.0
remote: Fetching activejob 6.0.2.2
remote: Installing activejob 6.0.2.2
remote: Fetching activerecord 6.0.2.2
remote: Fetching actionview 6.0.2.2
remote: Installing activerecord 6.0.2.2
remote: Installing actionview 6.0.2.2
remote: Fetching actionpack 6.0.2.2
remote: Installing actionpack 6.0.2.2
remote: Fetching actioncable 6.0.2.2
remote: Fetching activestorage 6.0.2.2
remote: Installing actioncable 6.0.2.2
remote: Installing activestorage 6.0.2.2
remote: Fetching actionmailer 6.0.2.2
remote: Installing actionmailer 6.0.2.2
remote: Fetching railties 6.0.2.2
remote: Fetching sprockets-rails 3.2.1
remote: Installing sprockets-rails 3.2.1
remote: Installing railties 6.0.2.2
remote: Fetching actionmailbox 6.0.2.2
remote: Installing actionmailbox 6.0.2.2
remote: Fetching actiontext 6.0.2.2
remote: Installing actiontext 6.0.2.2
remote: Fetching premailer-rails 1.11.1
remote: Installing premailer-rails 1.11.1
remote: Fetching responders 3.0.0
remote: Fetching haml-rails 2.0.1
remote: Installing responders 3.0.0
remote: Installing haml-rails 2.0.1
remote: Fetching rails 6.0.2.2
remote: Installing rails 6.0.2.2
remote: Fetching webpacker 4.2.2
remote: Fetching devise 4.7.1
remote: Installing webpacker 4.2.2
remote: Installing devise 4.7.1
remote: Fetching devise-i18n 1.9.1
remote: Installing devise-i18n 1.9.1
remote: Fetching devise_invitable 2.0.1
remote: Installing devise_invitable 2.0.1
remote: Fetching sassc-rails 2.1.2
remote: Installing sassc-rails 2.1.2
remote: Fetching sass-rails 6.0.0
remote: Installing sass-rails 6.0.0
remote: Bundle complete! 35 Gemfile dependencies, 82 gems now installed.
remote: Gems in the groups development and test were not installed.
remote: Bundled gems are installed into `./vendor/bundle`
remote: Post-install message from i18n:
remote:
remote: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
remote: But that may break your application.
remote:
remote: If you are upgrading your Rails application from an older version of Rails:
remote:
remote: Please check your Rails app for 'config.i18n.fallbacks = true'.
remote: If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
remote: 'config.i18n.fallbacks = [I18n.default_locale]'.
remote: If not, fallbacks will be broken in your app by I18n 1.1.x.
remote:
remote: If you are starting a NEW Rails application, you can ignore this notice.
remote:
remote: For more info see:
remote: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
remote:
remote: Removing bundler (2.0.2)
remote: Bundle completed (178.50s)
remote: Cleaning up the bundler cache.
remote: -----> Installing node-v10.15.3-linux-x64
remote: -----> Installing yarn-v1.16.0
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: rake aborted!
remote: ActiveSupport::MessageEncryptor::InvalidMessage: ActiveSupport::MessageEncryptor::InvalidMessage
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/message_encryptor.rb:206:in `rescue in _decrypt'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/message_encryptor.rb:183:in `_decrypt'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/message_encryptor.rb:157:in `decrypt_and_verify'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/messages/rotator.rb:21:in `decrypt_and_verify'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/encrypted_file.rb:80:in `decrypt'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/encrypted_file.rb:43:in `read'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/encrypted_configuration.rb:21:in `read'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/encrypted_configuration.rb:33:in `config'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/encrypted_configuration.rb:38:in `options'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/core_ext/module/delegation.rb:297:in `method_missing'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/devise-4.7.1/lib/devise/secret_key_finder.rb:24:in `key_exists?'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/devise-4.7.1/lib/devise/secret_key_finder.rb:10:in `find'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/devise-4.7.1/lib/devise/rails.rb:37:in `block in <class:Engine>'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.2/lib/rails/initializable.rb:32:in `instance_exec'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.2/lib/rails/initializable.rb:32:in `run'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.2/lib/rails/initializable.rb:61:in `block in run_initializers'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.2/lib/rails/initializable.rb:60:in `run_initializers'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.2/lib/rails/application.rb:363:in `initialize!'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/config/environment.rb:7:in `<main>'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in `block in require'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:291:in `load_dependency'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in `require'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.2/lib/rails/application.rb:339:in `require_environment!'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.2/lib/rails/application.rb:515:in `block in run_tasks_blocks'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
remote:
remote: Caused by:
remote: OpenSSL::Cipher::CipherError:
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/message_encryptor.rb:201:in `final'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/message_encryptor.rb:201:in `_decrypt'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/message_encryptor.rb:157:in `decrypt_and_verify'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/messages/rotator.rb:21:in `decrypt_and_verify'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/encrypted_file.rb:80:in `decrypt'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/encrypted_file.rb:43:in `read'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/encrypted_configuration.rb:21:in `read'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/encrypted_configuration.rb:33:in `config'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/encrypted_configuration.rb:38:in `options'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/core_ext/module/delegation.rb:297:in `method_missing'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/devise-4.7.1/lib/devise/secret_key_finder.rb:24:in `key_exists?'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/devise-4.7.1/lib/devise/secret_key_finder.rb:10:in `find'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/devise-4.7.1/lib/devise/rails.rb:37:in `block in <class:Engine>'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.2/lib/rails/initializable.rb:32:in `instance_exec'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.2/lib/rails/initializable.rb:32:in `run'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.2/lib/rails/initializable.rb:61:in `block in run_initializers'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.2/lib/rails/initializable.rb:60:in `run_initializers'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.2/lib/rails/application.rb:363:in `initialize!'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/config/environment.rb:7:in `<main>'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in `block in require'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:291:in `load_dependency'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in `require'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.2/lib/rails/application.rb:339:in `require_environment!'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.2/lib/rails/application.rb:515:in `block in run_tasks_blocks'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
remote: /tmp/build_08cbdbc00910a90e852ff158e1b74e8f/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
remote: Tasks: TOP => environment
remote: (See full trace by running task with --trace)
remote:
remote: !
remote: ! Precompiling assets failed.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to hagotarea-dev.
remote:

我已经尝试了在一些存储库和网站中找到的许多解决方案:

  • 删除config/master.keyconfig/encrypted.credentials.yml并通过 EDITOR="vim" bin/rails credentials:edit 重建
  • 添加 RAILS_MASTER_KEY到 Heroku 应用的配置变量。
  • 添加 SECRET_KEY_BASE也到 Heroku。
  • 重新运行rails g devise:install重新生成主 key 后。

没有任何效果,一切都提供相同的输出。

这是我的Gemfile

# frozen_string_literal: true

source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby "2.7.1"

gem "bcrypt", "~> 3.1.7"
gem "bootsnap", ">= 1.4.2", require: false
gem "devise"
gem "devise-bootstrap-views", "~> 1.0"
gem "devise-i18n"
gem "devise_invitable", "~> 2.0.0"
gem "haml-rails", "~> 2.0"
gem "image_processing", "~> 1.2"
gem "jbuilder", "~> 2.7"
gem "pg", ">= 0.18", "< 2.0"
gem "premailer-rails"
gem "puma", "~> 4.1"
gem "rails", "~> 6.0.2"
gem "redis", "~> 4.0"
gem "sass-rails", ">= 6"
gem "turbolinks", "~> 5"
gem "webpacker", "~> 4.0"

group :development, :test do
gem "annotate"
gem "awesome_print"
gem "byebug", platforms: %i[mri mingw x64_mingw]
gem "rubocop", require: false
gem "rubocop-performance", require: false
gem "rubocop-rails_config", require: false
end

group :development do
gem "brakeman"
gem "listen", ">= 3.0.5", "< 3.2"
gem "spring"
gem "spring-watcher-listen", "~> 2.0.0"
gem "web-console", ">= 3.3.0"
end

group :test do
gem "capybara", ">= 2.15"
gem "faker"
gem "selenium-webdriver"
gem "simplecov", require: false
gem "webdrivers"
gem "rails-controller-testing"
end

gem "tzinfo-data", platforms: %i[mingw mswin x64_mingw jruby]

谢谢!

最佳答案

我可能会迟到,但在使用 Rails 6 和凭据时请记住这一点:

1- 每当您编辑 rails 凭证(例如:rails credentials:edit --environment production)时,rails 都会生成一个新 key (config/credentials/production.key),并允许您添加您的文件中的凭据。

2- 在 production.rb 文件中,取消注释 config.require_master_key = true 并在您的服务器中设置一个 ENV(RAILS_MASTER_KEY) config/credentials/production.key 中提到的 key (例如:heroku config:set RAILS_MASTER_KEY=XXXXXXXXX)。

Rails will use RAILS_MASTER_KEY ENV, to decrypt your credentials instead of finding file inside config/credentials/production.key.

3- 切勿与任何人共享 production.key 文件,也不要将其推送到 VC,也不要尝试更改它,因为如果此文件被删除/更改,所有凭据可能会丢失。

关于ruby-on-rails - Rails 6 Heroku 设计错误 ActiveSupport::MessageEncryptor::InvalidMessage,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61279454/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com