如何在使用capstrano deploy时禁用rvm输出?

时间:2013-06-13 09:36:36

标签: ruby-on-rails rvm capistrano

我正在使用RVM,CAPSTRANO设置新服务器。

但是当我部署服务器时,我收到了一个错误:

  * 2013-06-13 16:39:50 executing `deploy:assets:update_asset_mtimes'
  * executing "[ -e /home/rails/server/blog/shared/assets/manifest.yml ] && cat /home/rails/server/blog/shared/assets/manifest.yml || echo"
    servers: ["121.196.130.171"]
    [121.196.130.171] executing command
    command finished in 1600ms
*** [deploy:update_code] rolling back
  * executing "rm -rf /home/rails/server/blog/releases/20130613083928; true"
    servers: ["121.196.130.171"]
    [121.196.130.171] executing command
 ** [out :: 121.196.130.171] Saving wrappers to '/data/home/rails/.rvm//bin'
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] 
 ** [out :: 121.196.130.171] Saving wrappers to '/data/home/rails/.rvm//bin'
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] 
 ** [out :: 121.196.130.171] Saving wrappers to '/data/home/rails/.rvm//bin'
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] .
 ** [out :: 121.196.130.171] 
    command finished in 1610ms
/home/rails/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): control characters are not allowed at line 1 column 1 (Psych::SyntaxError)

我从这里找到答案: psych.rb error when deploying with Capistrano 'mapping not allowed in this context'

但是当我使用上限时,如何禁用输出“将包装器保存到.......”? 还有bash shell“rvm use ***”?

谢谢!

1 个答案:

答案 0 :(得分:1)

当我在https://github.com/wayneeseguin/rvm/issues/1964#issuecomment-19437861上跟踪mpapis的建议时,我发现rvm停止打印“将包装器保存到.......”,即从您的after_user_textmate挂钩中删除执行权限rvm安装。

对于我的系统,我运行(替换你自己的rvm安装目录):

chmod a-x /usr/local/rvm/hooks/after_use_textmate