Capistrano no such file to load — deploy

后端 未结 6 2131
感情败类
感情败类 2021-01-05 03:37

When I try to run any cap commands, I get a "no such file to load -- deploy" error.

Here is the output:

Tylers-MacBook-Pro:cap_a         


        
6条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-05 04:22

    I've just had this problem today.

    The problem was caused by not specifying the cap gem version, and running bundle update, which updated cap to 3.* .

    After following the advice here, I still had the same problem. However, after checking the output carefully, I noticed that the error was coming from cap 3.* not being able to load deploy.

    This was strange, because I had then set the cap gem version to ~> 2, still had the error coming from cap 3.* . Did the same to downgrade the cap version to ~> 1, and again the error was still coming from cap 3.* .

    It was fixed by removing cap 3.* from my gemset completely.

    I was under the impression that I could have multiple gem versions installed, and as long as the version I wanted to use was specified in the Gemfile, then that would be the version used. I still have a couple of cap 2.* s installed although my Gemfile specifies ~> 1, the version 2 gems don't seem to impact, but having version 3.* installed too, causes me to have the problem described above by the OP.

    Hope this might help someone else.

    Paul

提交回复
热议问题