cannot load such file — capistrano/setup (LoadError)

非 Y 不嫁゛ 提交于 2019-12-11 10:38:54

问题


I am following https://gorails.com/deploy/ubuntu/16.04

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 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)

which is unsolvable to me at this point.


回答1:


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

  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.


来源:https://stackoverflow.com/questions/43790085/cannot-load-such-file-capistrano-setup-loaderror

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!