title: Rbenv for production with passenger
body: <p>I'm trying to install rbenv on my Debian 6 system for production. What is the best way to do this? I tried some tuts from the github wiki page (https://github.com/sstephenson/rbenv/wiki/Using-rbenv-in-production and <a href="https://github.com/sstephenson/rbenv/wiki/shared-install-of-rbenv" rel="nofollow">https://github.com/sstephenson/rbenv/wiki/shared-install-of-rbenv</a>), but I'm wondering what is the best practise.</p>
  
  <p>Is it better to install it with a deploy user or system wide? With a deploy user, it seems that the rubies aren't available for all users, even if I install it with <code>rbenv global 1.9.3-p125</code> and the <code>gem</code> commando isn't available too. This must be something with my paths, cause I only included the</p>
  
  <pre><code>if [[ -d $HOME/.rbenv ]]; then
    export PATH="$HOME/.rbenv/bin:$PATH"
    eval "$(rbenv init -)"
  fi
  </code></pre>
  
  <p>in the <code>.bashrc</code> file of my deploy user. Does passenger/apache know where my rubies are? Because apache is running with the <code>www-data</code> user.</p>
  
  <p>With system wide install (see shared installation link above) I ran in some strange error, that the rbenv command wasn't found and could not be compiled.</p>
  
  <p>So, what should I do? I want to use it for my production server so that I can easily switch between rubies in the future.</p>