ruby-on-rails - 使用 capstrano 部署时如何禁用 rvm 输出?

标签 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'

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

谢谢!

最佳答案

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

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

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

关于ruby-on-rails - 使用 capstrano 部署时如何禁用 rvm 输出?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17083806/

相关文章:

macos - Rails 服务器无法在 OSX 10.6.5 上使用 rvm 和 ruby​​ 1.9.2-p0 启动 mysql2

ruby-on-rails - 在具有多个(太多?) ruby 的机器上为 RVM 设置全局默认 Ruby

ruby-on-rails - : domain. com 连接失败(NoMethodError:未定义方法 `>' 为 true:TrueClass)

rvm - 使用 capistrano 进行部署会忽略组设置

git - Capistrano 无法使用 SSH pull Stash 存储库

javascript - Capistrano post deploy uglify-js 钩子(Hook)输出但不写入文件

ruby-on-rails - tailwind 3 未在 Rails + shakapacker + HAML 中完全加载(webpacker@v6、webpack@v5、postcss@v8)

javascript - 如何在 jquery (coffeescript) 中有条件地添加 css 属性

javascript - 在 Rails 中进行 Javascript 测试的 Culerity 与 Selenium

sql - activerecord 相当于 SQL 'minus'