[英]Using capistrano 3.16.0 then cap: command not found
為什么前置bundle exec
有效?
本質上,如果您通常會運行類似rspec spec/my_spec.rb
的程序,並且您想要使用 Gemfile 中指定並通過 bundle install 安裝的 gem,您應該運行bundle exec rspec spec/my_spec.rb.
如果我不想使用bundle exec
怎么辦?
1.使用Bundler的binstubs
對於 rbenv https://github.com/rbenv/rbenv/wiki/Understanding-binstubs#project-specific-binstubs
對於 RVM https://rvm.io/integration/bundler
2. 在計算機的.bash_profile 或.zshrc 中為bundle exec
設置一個別名用於zsh。
理想情況下,我們會將 alias be='bundle exec'
添加到.bash_profile
或.zshrc
並運行我們的可執行文件,並將be
添加到命令中。 示例: be rake
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.