title: Error ('The program 'rails' is currently not installed.') creating rails3 application using RVM
body: <p>I'm on Ubuntu 11
  Tring to install rails 3.1
  It seems like I install rails but then I can't use it.
  I want to use rvm to install and use rails and I do not want to go the sudo apt-get route.</p>
  
  <p>Thanks!</p>
  
  <pre><code>durrantm@castleLinux2011:~$ rvm list rubies
  
  rvm rubies
  
     ruby-1.9.2-p290 [ x86_64 ]
  
  durrantm@castleLinux2011:~$ rvm use --create 1.9.2@rails3
  Using /home/durrantm/.rvm/gems/ruby-1.9.2-p290 with gemset rails3
  durrantm@castleLinux2011:~$ rvm list rubies
  
  rvm rubies
  
  =&gt; ruby-1.9.2-p290 [ x86_64 ]
  
  durrantm@castleLinux2011:~$ gem install rails
      ERROR:  Loading command: install (LoadError)
      no such file to load -- zlib
      ERROR:  While executing gem ... (NameError)
          uninitialized constant Gem::Commands::InstallCommand
      durrantm@castleLinux2011:~$ sudo gem install rails
      Successfully installed rails-3.1.0
      1 gem installed
      Installing ri documentation for rails-3.1.0...
      file 'lib' not found
      Installing RDoc documentation for rails-3.1.0...
      file 'lib' not found
      durrantm@castleLinux2011:~$ rails
      The program 'rails' is currently not installed.  You can install it by typing:
      sudo apt-get install rails
      durrantm@castleLinux2011:~$ 
  </code></pre>
  
  <p>btw</p>
  
  <pre><code>durrantm@castleLinux2011:~$ gem install rails
  ERROR:  Loading command: install (LoadError)
      no such file to load -- zlib
  ERROR:  While executing gem ... (NameError)
      uninitialized constant Gem::Commands::InstallCommand
  durrantm@castleLinux2011:~$ 
  </code></pre>
  
  <p>doesn't work either and I have danced around the zlib issue for about an hour.</p>
  
  <p>Also:</p>
  
  <pre><code>rvm gemset install rails
  installing rails ...
  ERROR: Error running 'GEM_HOME='/home/durrantm/.rvm/gems/ruby-1.9.2-p290@rails3' GEM_PATH='/home/durrantm/.rvm/gems/ruby-1.9.2-p290@rails3'  gem install rails    ', please read /home/durrantm/.rvm/log/ruby-1.9.2-p290/gem.install.log
  rails  failed to install ( output logged to: /home/durrantm/.rvm/log/ruby-1.9.2-p290/gem.install.log )
  durrantm@castleLinux2011:~$ tail -20 /home/durrantm/.rvm/log/ruby-1.9.2-p290/gem.install.log
  [2011-09-13 09:17:57] GEM_HOME='/home/durrantm/.rvm/gems/ruby-1.9.2-p290@rails3' GEM_PATH='/home/durrantm/.rvm/gems/ruby-1.9.2-p290@rails3'  gem install rails    
  ERROR:  Loading command: install (LoadError)
      no such file to load -- zlib
  ERROR:  While executing gem ... (NameError)
      uninitialized constant Gem::Commands::InstallCommand
  durrantm@castleLinux2011:~$ 
  </code></pre>