无法加载此类文件 -- capistrano/setup (LoadError)
cannot load such file -- capistrano/setup (LoadError)
我关注https://gorails.com/deploy/ubuntu/16.04
最初我有一个版本的 capistrano 3.8.1,我最初的问题是:
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)
我用 "gem install rvm-capistrano" 解决了这个问题,它也安装了另一个版本的 capistrano,2.15.6,现在错误是:
nicoara@ubuntu:~/deploy_test$ cap install STAGES=production:
`require': cannot load such file -- capistrano/setup (LoadError)
目前我无法解决。
如评论所述,需要遵循几个步骤:
- 确保所有
capistrano/*
宝石都列在您的 Gemfile 中。
- 运行
bundle install
安装它们。
- 确保它们在您的 Capfile 中拼写正确(我不止一次搞砸了!)。
- 在
cap
命令前添加 bundle exec
以更加安全,即 STAGES=production bundle exec cap install
.
我关注https://gorails.com/deploy/ubuntu/16.04
最初我有一个版本的 capistrano 3.8.1,我最初的问题是:
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)
我用 "gem install rvm-capistrano" 解决了这个问题,它也安装了另一个版本的 capistrano,2.15.6,现在错误是:
nicoara@ubuntu:~/deploy_test$ cap install STAGES=production:
`require': cannot load such file -- capistrano/setup (LoadError)
目前我无法解决。
如评论所述,需要遵循几个步骤:
- 确保所有
capistrano/*
宝石都列在您的 Gemfile 中。 - 运行
bundle install
安装它们。 - 确保它们在您的 Capfile 中拼写正确(我不止一次搞砸了!)。
- 在
cap
命令前添加bundle exec
以更加安全,即STAGES=production bundle exec cap install
.