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

前端 未结 2 627
旧时难觅i
旧时难觅i 2020-12-19 20:50

I am currently setting up capistrano in my Rails 3.2.13 app. I am getting the below error/details (including \"control characters are not allowed at line 1 column 1\"). I ha

相关标签:
2条回答
  • 2020-12-19 21:12

    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'

    0 讨论(0)
  • 2020-12-19 21:27

    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.

    0 讨论(0)
提交回复
热议问题