[英]Error bash: bundle: command not found while cap deploy:cold
[英]cap staging deploy: bash: bundle: command not found
我正在使用rbenv
在CentOS 7上运行我的Rails 5项目。 当我运行cap staging deploy
我得到了错误:
cd /srv/www/stagings/testproject/current; bundle exec rake db:migrate RAILS_ENV=staging stderr: bash: bundle: command not found
** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:
INFO [f7a6296f] Finished in 0.256 seconds with exit status 0 (successful).
我可以在deploy目录/srv/www/stagings/testproject/current
运行bundle install
而不会有任何问题。
.bash_profile中
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
export PATH="$HOME/.rbenv/bin:$PATH"
export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
eval "$(rbenv init -)"
ruby,gem,bundler版本:
which ruby
~/.rbenv/shims/ruby
which bundle
~/.rbenv/shims/bundle'
which gem
~/.rbenv/shims/gem
我试过了
gem uninstall bundler
gem install bundler`
不起作用。 有帮助吗? 非常感谢你!
你应该使用capistrano / rbenv。 Capistrano不会通过ssh启动交互式shell。 所以你的.bash_profile
不会被加载。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.