我有问题。我已经安装了rvm,但当我尝试cap deploy:setup
时,我有:
bash: /usr/local/rvm/bin/rvm-shell: No such file or directory
command finished in 244ms
failed: "rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell 'ruby-1.9.3-p0' -c 'mkdir -p /srv/xxx /srv/xxx/releases /srv/xxx/shared /srv/xxx/shared/system /srv/xxx/shared/log /srv/xxx/shared/pids'" on xxxxxxxx
我尝试过cd
到/usr/local/rvm
,但我有No such file or directory
。如何解决?
答案 0 :(得分:7)
set :default_shell, "/bin/bash -l"
适合我
答案 1 :(得分:5)
适合我:
set :rvm_type, :user
之前检查你的rvm-shell在哪里。 在服务器上运行:
which rvm-shell
如果您看到/home/mihserf/.rvm/bin/rvm-shell之类的内容,请尝试上面提到的解决方案。
答案 2 :(得分:1)
按照https://github.com/wayneeseguin/rvm-capistrano#readme上的文档添加到config/deploy.rb
:
before 'deploy:setup', 'rvm:install_rvm'
可用的例子很少,最有趣https://github.com/wayneeseguin/rvm-capistrano#rvm--ruby-on-every-deploy
此处描述了所有可用选项:https://github.com/wayneeseguin/rvm-capistrano#options
答案 3 :(得分:1)
使用以下命令在deploy.rb文件中设置默认shell:
set :default_shell, :bash
或有选择地在您的任务中(仅举例):
namespace :deploy do
desc "Install stuff"
task :install do
run "#{sudo} apt-get -y update", :shell => "sh"
run "#{sudo} apt-get -y install python-software-properties build-essential, :shell => "sh"
end
end
有关详细信息,请查看docs
答案 4 :(得分:1)
如果您使用的是ubuntu rvm package,则需要在{.bashrc文件的底部添加<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="list">
<div class="item">
<div>Item 1</div>
<button class="button">50</button>
</div>
<div class="item">
<div>Item 2</div>
<button class="button">30</button>
</div>
<div class="item">
<div>Item 3</div>
<button class="button">70</button>
</div>
</div>
<span id="value">Total:</span>
。