title: RVM + Zsh "RVM is not a function, selecting rubies with 'rvm use ...' will not work"
body: <p>I'll start by saying I'm not an expert at command-line, so I really only barely know what I'm doing.</p>
  <p>I cannot get RVM and oh-my-zsh to play nice together. I've tried several different solutions posted around, some on SO, but nothing I have found seems to fix the issue.</p>
  <p>Initially, someone else setup RVM on my machine. I later setup oh-my-zsh myself, and remember having a lot of trouble doing so.</p>
  <p>My <code>.zhsrc</code> file is completely default except for these 2 lines</p>
  <pre><code>export PATH=$HOME/bin:/usr/local/bin:/usr/local/rvm/bin:$PATH
  
  #pretty sure this line does nothing, although I've seen this fix around
  # several places. I noticed that I don't seem to have an .rvm file in my 
  # home directory which would be an issue, but I have no idea how to 
  # go about correcting this.
  [[ -s &quot;$HOME/.rvm/scripts/rvm&quot; ]] &amp;&amp; source &quot;$HOME/.rvm/scripts/rvm&quot; 
  </code></pre>
  <p>I added the <code>/usr/local/rvm</code> to the Path directive as zsh returns <code>zsh: rvm command not found</code> without it there. Otherwise most rvm command work, with the exception of <code>rvm use</code> which throws the following error:</p>
  <pre><code>RVM is not a function, selecting rubies with 'rvm use ...' will not work.
  
  You need to change your terminal emulator preferences to allow login shell.
  Sometimes it is required to use `/bin/bash --login` as the command.
  Please visit https://rvm.io/integration/gnome-terminal/ for a example.
  </code></pre>
  <p>I have ensured the profile preferences on my profile in iTerm2 are set to &quot;Login Shell&quot; as recommended by RVM</p>
  <p><img src="https://i.stack.imgur.com/4FvlK.png" alt="iTerm2 Preferences - Login Shell" /></p>
  <p>I have tried changing these preferences to the &quot;Command&quot; option and using the recommended <code>/bin/bash/ --login</code> as the command, however zsh no longer appears to work when this happens. Changing the command to <code>/bin/zsh/ --login</code> allows zsh to work again but does not solve the problem as I still get the &quot;RVM is not a function&quot; error when trying to run <code>rvm use</code></p>
  <p>The default ruby in RVM is set to 2.0.0. I can run <code>ruby -v</code> in my home folder and get the ruby version output which shows the default version.</p>
  <p>Working on rails projects, I can run all rails commands IF the Gemfile specifies ruby 2.0.0, the default. However on a project that uses a different version, I get the following error:</p>
  <pre><code>Your Ruby version is 2.0.0, but your Gemfile specified 1.9.3
  </code></pre>
  <p>Then I cannot run <code>rvm use 1.9.3</code> as it returns the above mentioned error.</p>
  <h2>How can I make zsh play nice with RVM?</h2>
  <p>Some info about my setup:</p>
  <ul>
  <li>Mac OSX 10.9.1 (Mavericks)</li>
  <li>iTerm2</li>
  <li>Zsh 5.0.2 with oh-my-zsh</li>
  <li>RVM 1.5.1</li>
  </ul>