title: Installing RVM on existing ruby1.8 installation
body: <p>I have a big problem with my Debian server configuration. Someone before me has made a big mess with ruby installation and now i can't manage to get it all working. <strong>What i'm trying to do now is to get back to environment, where ruby1.8 is installed and rails app is working correctly with apache+passenger</strong>. If it would be working on RVM it would be perfect. Here is the story:</p>
  
  <p>There was ruby 1.8 installed on a server. The person has removed it with <code>sudo apt-get remove ruby1.8</code> and then installed version 2.0.x manually using those commands:</p>
  
  <pre><code>mkdir /tmp/ruby &amp;&amp; cd /tmp/ruby
  curl --progress ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz | tar xz
  cd ruby-2.0.0-p247
  ./configure
  make
  sudo make install
  </code></pre>
  
  <p>Then, he has removed all the dirs listed by <code>whereis ruby</code> with <code>rm</code> command.</p>
  
  <p>And here i came - i want to install RVM on this server. The problem is, no matter what i do, i get a lot of errors from all sides. Steps i've done:</p>
  
  <pre><code># Install RVM
  curl -L https://get.rvm.io | bash -s stable
  
  # install 1.8.7 version
  rvm install 1.8.7
  
  # use 1.8.7
  rvm use 1.8.7
  
  # Install gems
  bundle install
  </code></pre>
  
  <p>First thing (and that's just a tip of iceberg) is that i'm not able to start apache2 in cause of the following error:</p>
  
  <blockquote>
    <p>apache2: Syntax error on line 203 of /etc/apache2/apache2.conf: Syntax
    error on line 1 of /etc/apache2/mods-enabled/passenger.load: Cannot
    load
    /usr/lib/ruby/gems/1.8/gems/passenger-4.0.5/libout/apache2/mod_passenger.so
    into server:
    /usr/lib/ruby/gems/1.8/gems/passenger-4.0.5/libout/apache2/mod_passenger.so:
    cannot open shared object file: No such file or directory Action
    'configtest' failed.</p>
  </blockquote>
  
  <p>Looks like there is even no <code>/usr/lib/ruby/</code> dir on my system right now. </p>
  
  <p>The question is: is there any way to reset all ruby-releated libraries on debian to the original state (debian without ruby installed) and install working RVM on top of that? Thanks in advance for any help.</p>