/usr/bin/env ruby no such file or directory: Using capistrano 3, capistrano/rbenv, capistrano/bundler and capistrano/rails (using rails 4)

后端 未结 9 1846
别那么骄傲
别那么骄傲 2021-02-02 08:45

I\'m using capistrano, capistrano/rbenv, capistrano/bundler and capistrano/rails. I get this error in the step where capistrano compiles the assets:

DEBUG [49a50         


        
9条回答
  •  鱼传尺愫
    2021-02-02 09:34

    I had the same problem using rbenv. What solved it for me was including the rbenv library before bundler--not after it. The order turned out to be important. Here's what's in my Capfile:

    require 'capistrano/rbenv'
    require 'capistrano/bundler'
    

    If you did it right you should see the bundle command executed with the rbenv prefix, along these lines:

    XX RBENV_ROOT=$HOME/.rbenv RBENV_VERSION=2.3.0 $HOME/.rbenv/bin/rbenv exec bundle install ...
    

提交回复
热议问题