简体   繁体   English

Rails部署Capistrano-capistrano / cli(LoadError)

[英]Rails deployment Capistrano - capistrano/cli (LoadError)

I followed this tutorial. 我遵循了本教程。

https://gorails.com/deploy/ubuntu/14.04#capistrano https://gorails.com/deploy/ubuntu/14.04#capistrano

Now i am stuck at this 现在我被困在这个

I ran this command after set Adding The Nginx Host cap production deploy 在设置“添加Nginx主机上限生产部署”后,我运行了此命令

and ran into this, now no idea what to do. 并遇到了这个问题,现在不知道该怎么办。

/home/deploy/.rbenv/versions/2.2.4/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require': cannot load such file -- capistrano/cli (LoadError) from /home/deploy/.rbenv/versions/2.2.4/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require' from /usr/bin/cap:3:in `' /home/deploy/.rbenv/versions/2.2.4/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require': cannot load such file -- capistrano/cli (LoadError) from /home/deploy/.rbenv/versions/2.2.4/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in / usr / bin / cap:3: require': cannot load such file -- capistrano/cli (LoadError) from /home/deploy/.rbenv/versions/2.2.4/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in '

I solve this problem by remove old Capistrano gem. 我通过删除旧的Capistrano宝石解决了这个问题。

# remove all old versions of the gem
gem cleanup rjb

I have the same error and it's because I installed this Gem and upgraded my ruby from 2.0.0 to 2.1.9. 我有同样的错误,这是因为我安装了这颗宝石并将红宝石从2.0.0升级到2.1.9。 Reinstallation resolves my issue. 重新安装可以解决我的问题。 Hope this can help you. 希望这可以帮到你。

If you still have this problem, I highly recommend you use bundler and 如果仍然存在此问题,强烈建议您使用捆绑程序,

bundle exec cap <args>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM