I am getting this error
cap deploy:setup
bash: /usr/bin/cap: No such file or directory
gem list:--
capistrano (2.5.19)
capistrano-ext (1.2.1)
Previously i was getting an issue like:--
cap deploy:setup
/usr/lib/ruby/1.8/capistrano/configuration/loading.rb:152:in `require': no such file to load -- capistrano/ext/multistage (LoadError)
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:152:in `require'
from ./config/deploy.rb:2:in `load'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:172:in `load_from_file'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:89:in `load'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in `load'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in `each'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in `load'
from Capfile:3:in `load'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:172:in `load_from_file'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:89:in `load'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in `load'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in `each'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in `load'
from /usr/lib/ruby/1.8/capistrano/cli/execute.rb:64:in `load_recipes'
from /usr/lib/ruby/1.8/capistrano/cli/execute.rb:64:in `each'
from /usr/lib/ruby/1.8/capistrano/cli/execute.rb:64:in `load_recipes'
from /usr/lib/ruby/1.8/capistrano/cli/execute.rb:30:in `execute!'
from /usr/lib/ruby/1.8/capistrano/cli/execute.rb:14:in `execute'
from /usr/bin/cap:4
So i did:--
sudo gem uninstall capistrano
sudo rm -rf /usr/bin/cap
sudo gem install capistrano-ext
sudo gem install capistrano
so im getting the eror i specified earlier:--
cap deploy:setup
bash: /usr/bin/cap: No such file or directory
How can fix this issue. I am not able to find this using google etc.
如果使用捆绑程序,请尝试在捆绑程序上下文中执行: bundle exec cap deploy:setup
取出两个宝石,然后重新安装。
I'm going to guess that ls -l /usr/bin/cap
actually shows a small file there.
Capistrano is written in Ruby and the first line of the file will be a shebang that probably references the Ruby interpreter with an absolute path name.
Type head -1 cap
or cat cap
and see if the Ruby interpreter is really located where the cap
script thinks it is. If not, you can install a gem on top of itself, so just install capistrano again.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.