Rails 3 — Bundler/Capistrano Errors

前端 未结 8 1629
攒了一身酷
攒了一身酷 2020-12-07 13:39

I have a basic Rails 3 app working locally on my development box, but want to test out deploying early on to make sure everything works. I\'m using Capistrano to deploy.

8条回答
  •  感动是毒
    2020-12-07 13:49

    Bundler isn't found because .bash_profile is not being loaded and thus your PATH is wrong. This is probably because you have the RVM script in .bash_profile.

    The simple answer is to move the RVM script from .bash_profile to .bashrc and Capistrano should be able to find it (also verify that .bash_profile sources .bashrc).

    Capistrano uses SSH to execute commands on the server via a non-interactive shell. This shell session will source .bashrc but not .bash_profile. I added an ECHO statement to both and ran an LS via SSH. You can see in the results below that only .bashrc is sourced:

    $ ssh user@123.amazonaws.com ls
    .bashrc loaded
    git
    file1
    file2
    

提交回复
热议问题