<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <generator>Persumi - Level up your writing and blogging with AI</generator>
  <category label="Blog" scheme="http://persumi.com/u/fredwu/tech/e/blog" term="blog"/>
  <category label="Tech" scheme="http://persumi.com/u/fredwu/tech" term="tech"/>
  <link href="http://persumi.com/u/fredwu/tech/e/blog/t/bundler"/>
  <link href="http://persumi.com/u/fredwu/tech/e/blog/t/bundler/feed/rss"/>
  <link rel="self" href="http://persumi.com/u/fredwu/tech/e/blog/t/bundler/feed/atom"/>
  <author>
    <name>Fred Wu</name>
    <email>ifredwu@gmail.com</email>
    <uri>http://persumi.com/u/fredwu</uri>
  </author>
  <subtitle/>
  <id>http://persumi.com/u/fredwu/tech/e/blog/t/bundler</id>
  <title>Blog (bundler) - Fred Wu&apos;s Tech</title>
  <updated>2026-05-16T04:54:34.739332Z</updated>
  <entry>
    <content type="html">&lt;![CDATA[&lt;p&gt;
Don’t you just hate it when you get the following errors during a &lt;a href=&quot;http://www.capify.org/&quot;&gt;Capistrano&lt;/a&gt; deployment?&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;shell language-shell&quot;&gt;bundle: command not found
Could not find RubyGem bundler (&amp;gt;= 0) (Gem::LoadError)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
In fact, even if you don’t use &lt;a href=&quot;http://gembundler.com/&quot;&gt;bundler&lt;/a&gt;, you might still get errors like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;shell language-shell&quot;&gt;rake: command not found
Could not find RubyGem rake (&amp;gt;= 0) (Gem::LoadError)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
It turns out this has something to do with the &lt;code class=&quot;inline&quot;&gt;$PATH&lt;/code&gt; and &lt;code class=&quot;inline&quot;&gt;$GEM_HOME&lt;/code&gt; variables.&lt;/p&gt;
&lt;p&gt;
So here’s the quick fix.&lt;/p&gt;
&lt;p&gt;
Log in to your deployment server, as a root user, add the following line to &lt;code class=&quot;inline&quot;&gt;/etc/ssh/sshd_config&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;PermitUserEnvironment yes&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
Don’t forget to restart &lt;code class=&quot;inline&quot;&gt;ssh&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;shell language-shell&quot;&gt;/etc/init.d/ssh restart&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
Now, log in as the deployment user, and create ’~/.ssh/environment’ with the following content:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;shell language-shell&quot;&gt;PATH=/usr/local/rvm/gems/ruby-1.9.2-p0/bin:/bin:/usr/local/rvm/rubies/ruby-1.9.2-p0/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
GEM_HOME=/usr/local/rvm/gems/ruby-1.9.2-p0&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
&lt;em&gt;* The above paths are for your reference only, obviously you need to work them out for your server environment. The only thing you need to make sure is that the &lt;code class=&quot;inline&quot;&gt;GEM_HOME&lt;/code&gt;’s path matches one from the &lt;code class=&quot;inline&quot;&gt;PATH&lt;/code&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;
Now, to verify this all work, you may use &lt;code class=&quot;inline&quot;&gt;cap shell&lt;/code&gt; to start a new shell session and try out your commands.&lt;/p&gt;
]]&gt;</content>
    <published>2010-09-16T05:59:00.000000Z</published>
    <category label="Blog" scheme="http://persumi.com/u/fredwu/tech/e/blog" term="blog"/>
    <category label="Tech" scheme="http://persumi.com/u/fredwu/tech" term="tech"/>
    <link href="http://persumi.com/u/fredwu/tech/e/blog/p/bundle-command-not-found-or-could-not-find-rubygem-bundler-0-during-capistrano-deployment-no-problems"/>
    <author>
      <name>Fred Wu</name>
      <email>ifredwu@gmail.com</email>
      <uri>http://persumi.com/u/fredwu</uri>
    </author>
    <id>http://persumi.com/u/fredwu/tech/e/blog/p/bundle-command-not-found-or-could-not-find-rubygem-bundler-0-during-capistrano-deployment-no-problems</id>
    <title>`bundle: command not found` or `Could not find RubyGem bundler (&gt;= 0)` During Capistrano Deployment? No Problems!</title>
    <updated>2010-09-16T05:59:00.000000Z</updated>
  </entry>
</feed>