Why am I getting a Psych error when trying to deploy with capistrano?

怎甘沉沦 提交于 2019-11-29 11:40:44
mihai

This comes from a possible problem in your .bashrc. Check this question for additional details: psych.rb error when deploying with Capistrano 'mapping not allowed in this context'

Denis Ahearn

I also had this problem, but for a different reason. We are using rvm-capistrano, and our project has a .rvmrc file. The deploy:assets:update_asset_mtimes Capistrano task runs a shell command on the server to capture the contents of the assets manifest. The presence of the .rvmrc file in the deploy generated a "You are using '.rvmrc', it requires trusting..." warning from RVM, which inadvertently became part of the output of the shell command. I only saw this after instrumenting the assets.rb recipe in my local capistrano gem with a puts statement.

I fixed my issue by running "rvm rvmrc warning ignore all.rvmrcs" on the server, and then deploying again.

Another option would be to switch away from .rvmrc and the whole trusting thing to use the .ruby-version approach. See Use rvmrc or ruby-version file to set a project gemset with RVM? for details.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!