[英]Capistrano fails when trying to connect to remote db saying: rvm-shell no such file or directory
I have a capistrano recipe that is using a remote database in a Rails 3 application. 我有一个Capistrano配方,该配方在Rails 3应用程序中使用远程数据库。 Here is part of the recipe:
这是食谱的一部分:
role :web, "ip1"
role :app, "ip1"
role :db, "ip2"
set :rvm_type, :system
set :rvm_ruby_string, '1.9.3'
set :deploy_to, "/apps/gits/#{application}"
set :deploy_via, :remote_cache
set :deploy_env, 'production'
And capistrano is giving me this error: usr/local/rvm/bin/rvm-shell: No such file or directory
而capistrano给我这个错误:
usr/local/rvm/bin/rvm-shell: No such file or directory
But if I comment out the database server (which doesn't have rvm) and let rails think the db is on the web server (which does have rvm) everything works fine. 但是,如果我注释掉数据库服务器(没有rvm),并让rails认为数据库位于Web服务器(确实有rvm)上,则一切正常。
I'm assuming since :rvm_type is set to system capistrano is looking for it on the system, but why is it looking for it at all ? 我假设因为:rvm_type设置为system capistrano在系统上寻找它,但是为什么它仍在寻找呢? Is there any way around this ?
有没有办法解决 ?
rvm-capistrano does not support it yet, you would have to set :default_shell
per server. rvm-capistrano还不支持它,您必须为每个服务器
set :default_shell
。
there is already a ticket for this feature https://github.com/wayneeseguin/rvm-capistrano/issues/11 已经有此功能的门票https://github.com/wayneeseguin/rvm-capistrano/issues/11
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.