Ruby on Rails Thursday, April 12, 2018

Hi,

How to fix the recent error regarding rails secrets encryption and ruby?

I have one container running since week start that allows we to "rails secrets:edit" successfully.  Today, if I carbon copy the source code, do new bundle install and secrets fail.  What is going on?

  Message from application: ActiveSupport::MessageEncryptor::InvalidMessage (ActiveSupport::MessageEncryptor::InvalidMessage)
  /bundle/ruby/2.5.0/gems/activesupport-5.1.5/lib/active_support/message_encryptor.rb:133:in `rescue in _decrypt'
  /bundle/ruby/2.5.0/gems/activesupport-5.1.5/lib/active_support/message_encryptor.rb:111:in `_decrypt'
  /bundle/ruby/2.5.0/gems/activesupport-5.1.5/lib/active_support/message_encryptor.rb:84:in `decrypt_and_verify'
  /bundle/ruby/2.5.0/gems/railties-5.1.5/lib/rails/secrets.rb:55:in `decrypt'
  /bundle/ruby/2.5.0/gems/railties-5.1.5/lib/rails/secrets.rb:96:in `preprocess'
  /bundle/ruby/2.5.0/gems/railties-5.1.5/lib/rails/secrets.rb:27:in `block in parse'
  /bundle/ruby/2.5.0/gems/railties-5.1.5/lib/rails/secrets.rb:24:in `each'
  /bundle/ruby/2.5.0/gems/railties-5.1.5/lib/rails/secrets.rb:24:in `each_with_object'
  /bundle/ruby/2.5.0/gems/railties-5.1.5/lib/rails/secrets.rb:24:in `parse'
  /bundle/ruby/2.5.0/gems/railties-5.1.5/lib/rails/application.rb:391:in `secrets'
  /var/www/html/config/initializers/swagger_ui_engine.rb:3:in `block in <top (required)>'
  /bundle/ruby/2.5.0/gems/swagger_ui_engine-1.1.0/lib/swagger_ui_engine.rb:15:in `configure'
  /var/www/html/config/initializers/swagger_ui_engine.rb:1:in `<top (required)>'
  /bundle/ruby/2.5.0/gems/activesupport-5.1.5/lib/active_support/dependencies.rb:286:in `load'
  /bundle/ruby/2.5.0/gems/activesupport-5.1.5/lib/active_support/dependencies.rb:286:in `block in load'
  /bundle/ruby/2.5.0/gems/activesupport-5.1.5/lib/active_support/dependencies.rb:258:in `load_dependency'
  /bundle/ruby/2.5.0/gems/activesupport-5.1.5/lib/active_support/dependencies.rb:286:in `load'
  /bundle/ruby/2.5.0/gems/railties-5.1.5/lib/rails/engine.rb:655:in `block in load_config_initializer'
  /bundle/ruby/2.5.0/gems/activesupport-5.1.5/lib/active_support/notifications.rb:168:in `instrument'
  /bundle/ruby/2.5.0/gems/railties-5.1.5/lib/rails/engine.rb:654:in `load_config_initializer'
  /bundle/ruby/2.5.0/gems/railties-5.1.5/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
  /bundle/ruby/2.5.0/gems/railties-5.1.5/lib/rails/engine.rb:611:in `each'
  /bundle/ruby/2.5.0/gems/railties-5.1.5/lib/rails/engine.rb:611:in `block in <class:Engine>'
  /bundle/ruby/2.5.0/gems/railties-5.1.5/lib/rails/initializable.rb:30:in `instance_exec'
  /bundle/ruby/2.5.0/gems/railties-5.1.5/lib/rails/initializable.rb:30:in `run'
  /bundle/ruby/2.5.0/gems/railties-5.1.5/lib/rails/initializable.rb:59:in `block in run_initializers'
  /usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:228:in `block in tsort_each'
  /usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
  /usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
  /usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:431:in `each_strongly_connected_component_from'
  /usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
  /bundle/ruby/2.5.0/gems/railties-5.1.5/lib/rails/initializable.rb:48:in `each'
  /bundle/ruby/2.5.0/gems/railties-5.1.5/lib/rails/initializable.rb:48:in `tsort_each_child'
  /usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:415:in `call'
  /usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:415:in `each_strongly_connected_component_from'
  /usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:349:in `block in each_strongly_connected_component'
  /usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:347:in `each'
  /usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:347:in `call'
  /usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:347:in `each_strongly_connected_component'
  /usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:226:in `tsort_each'
  /usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:205:in `tsort_each'
  /bundle/ruby/2.5.0/gems/railties-5.1.5/lib/rails/initializable.rb:58:in `run_initializers'
  /bundle/ruby/2.5.0/gems/railties-5.1.5/lib/rails/application.rb:353:in `initialize!'
  /var/www/html/config/environment.rb:5:in `<top (required)>'
  config.ru:3:in `require_relative'
  config.ru:3:in `block in <main>'
  /bundle/ruby/2.5.0/gems/rack-2.0.4/lib/rack/builder.rb:55:in `instance_eval'
  /bundle/ruby/2.5.0/gems/rack-2.0.4/lib/rack/builder.rb:55:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `eval'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `preload_app'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `<module:App>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c1ffbcd3-6e1a-4b40-8a67-edaa4331ad4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment