【问题标题】:How to disable rvm output when use capstrano deploy?使用 capstrano 部署时如何禁用 rvm 输出?
【发布时间】:2013-06-13 09:36:35
【问题描述】:

我正在设置一个带有 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'

但是当我使用 cap 时,如何禁用输出“将包装器保存到.......”? 也适用于 bash shell "rvm use ***" ?

谢谢!

【问题讨论】:

    标签: ruby-on-rails rvm capistrano


    【解决方案1】:

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

    对于我的系统,我跑了(代替你自己的rvm安装目录):

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

    【讨论】:

      猜你喜欢
      • 2017-04-18
      • 2012-04-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-09
      • 1970-01-01
      • 2011-07-12
      • 1970-01-01
      相关资源
      最近更新 更多