Rails部署Digitalocean ActiveSupport :: MessageEncryptor :: InvalidMessage:
我正在按照本指南在digitalocean上部署应用程序: https : //www.digitalocean.com/community/tutorials/deploying-a-rails-app-on-ubuntu-14-04-with-capistrano-nginx-and-彪马#先决条件
当我使用cap cap production deploy:initial --trace
我一直收到此错误
部署在此处停止: 01 ~/.rvm/bin/rvm default do bundle exec rake assets:precompile 01 rake aborted! 01 01 ActiveSupport::MessageEncryptor::InvalidMessage: ActiveSupport::MessageEncryptor::Inva… 01
01 ~/.rvm/bin/rvm default do bundle exec rake assets:precompile 01 rake aborted! 01 01 ActiveSupport::MessageEncryptor::InvalidMessage: ActiveSupport::MessageEncryptor::Inva… 01
当我运行bundle exec rake资产时:在本地预编译我得到yarn install v1.7.0 [1/4] 🔍 Resolving packages... success Already up-to-date. ✨ Done in 0.05s.
yarn install v1.7.0 [1/4] 🔍 Resolving packages... success Already up-to-date. ✨ Done in 0.05s.
我还在ubuntu服务器上安装了yarn。 我已经确定服务器上的ssh密钥与〜/ .ssh / id_rsa.pub和〜/ .ssh / id_rsa下的本地ssh密钥相同
我认为这是一个SSH问题,但我认为这可能是其他事情,因为我已经完全遵循了digitalocean和其他地方的在线指南。
任何帮助,将不胜感激!
通过使用export设置密钥库来修复此错误。
export SECRET_KEY_BASE="secret key"
要在rails 5.2中查找或设置您的密钥,请使用
rails credentials:edit
或者如果你还没有设置你的编辑器
EDITOR="vim --wait" rails credentials:edit
复制该密钥然后使用导出行
- 如果你想使用它,如何解决“你需要为你的Gemfile添加gem’守护进程’”生产模式错误?
- 切换到Capistrano后,Passenger上的Rails应用程序上的Bundler :: GemfileError
- Capistrano 3拉命令行参数
- 有没有办法使用capistrano(或类似)远程与rails控制台交互
- Rubber和Amazon EC2托管问题(Net :: SSH :: AuthenticationFailed:root)
- 使用Capistrano将Rails应用程序部署到多个Web服务器
- Cap deploy – 错误:找不到存储库
- 从capistrano任务中调用多级capistrano任务
- Rails 4 + Capistrano 3:部署:检查不工作