Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It was my understanding that the bundle command is not found because the PATH variable, defined in the user's ~/.bash_profile, isn't loaded by Capistrano.</p> <p>To get around this I have created a task :bundle_gems.</p> <pre><code>task :bundle_gems do run "cd #{deploy_to}/current &amp;&amp; export PATH=/usr/local/pgsql/bin:/opt/ruby-enterprise-X.X.X/bin:$PATH &amp;&amp; bundle install vendor/gems" end </code></pre> <p>Note that I also include the path to PostgreSQL binaries - installation of the pg gem was failing because they could not be found, even when bundle could be found.</p> <p>This seems like a messy approach, though. Presumably there is a more 'global' place to define paths to binaries that I don't know about.</p> <p><strong>Update 23/12</strong></p> <p>To add a directory to $PATH for all users: <a href="https://serverfault.com/questions/102932/adding-a-directory-to-path-in-centos">https://serverfault.com/questions/102932/adding-a-directory-to-path-in-centos</a></p> <p>However this still won't be loaded because it is a non-interactive non-login shell.</p> <p>One suggestion was to add the paths to /etc/bashrc: <a href="https://stackoverflow.com/questions/940533/how-do-i-set-path-such-that-ssh-userhost-command-works">How do I set $PATH such that `ssh user@host command` works?</a></p> <p>However this also didn't work for me. I believe its because SSH doesn't load /etc/bashrc either.</p> <p>Another suggestion was to edit ~/.ssh/environment: <a href="http://www.ruby-forum.com/topic/79248" rel="nofollow noreferrer">http://www.ruby-forum.com/topic/79248</a>. However this seems almost as messy as specifying the paths in deploy.rb.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload