【发布时间】:2016-10-05 11:28:40
【问题描述】:
我正在使用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).
我可以在部署目录/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`
不起作用。 有什么帮助吗?非常感谢!
【问题讨论】:
标签: ruby-on-rails capistrano rbenv