无法加载此类文件-capistrano / setup(LoadError) [英] cannot load such file -- capistrano/setup (LoadError)

查看:76
本文介绍了无法加载此类文件-capistrano / setup(LoadError)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注 https://gorails.com/deploy/ubuntu/16.04

最初我有一个版本的capistrano 3.8.1,最初的问题是:

Initially i have one version of capistrano 3.8.1 and my problem initially is:

nicoara@ubuntu:~/deploy_test$ cap install STAGES=production
  /home/nicoara/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- capistrano/cli (LoadError)

i使用 gem install rvm-capistrano解决此问题,该命令还将安装另一个版本的capistrano 2.15.6,现在错误是:

i solve this with "gem install rvm-capistrano" which installs another version of capistrano as well, 2.15.6, and now the error is:

nicoara@ubuntu:~/deploy_test$ cap install STAGES=production:
`require': cannot load such file -- capistrano/setup (LoadError)

目前我无法解决。

推荐答案

正如评论所述,有一些步骤要遵循:

As the comment states, there are a few steps to follow:


  1. 确保所有 capistrano / * 宝石都列在您的Gemfile中。

  2. 运行 bundle install 进行安装。

  3. 请确保Capfile中的拼写正确(我已经多次搞砸了!) 。

  4. cap 命令与 bundle exec 一起使用会更加安全,即 STAGES =生产捆绑包执行程序上限安装

  1. Make sure all capistrano/* gems are listed in your Gemfile.
  2. Run bundle install to install them.
  3. Make sure they're spelled correctly in your Capfile (I've messed that up more than once!).
  4. Prepend cap commands with bundle exec to be extra safe, i.e. STAGES=production bundle exec cap install.

这篇关于无法加载此类文件-capistrano / setup(LoadError)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆