title: Passenger ('Bundler:RubyVersionMismatch')
body: <p>I'm having a problem  with deploying my rails app on my server. I'm deploying using Passenger for serving up pages. The following error is listed on my page when I start the server. It seems like the version of passenger I have installed is referencing ruby 1.8.7 but my app has been built in 2.0.0. I've tried removing ruby 1.8.7 and reinstalling Passenger, but no luck so far. If I run ruby -v from my directory it lists the version as 2.0.0. </p>
  
  <pre><code>Your Ruby version is 1.8.7, but your Gemfile specified 2.0.0 (Bundler::RubyVersionMismatch)
  /home/ubuntu/.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.4/lib/bundler/definition.rb:361:in `   validate_ruby!'
  /home/ubuntu/.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.4/lib/bundler.rb:116:in `setup'
  /home/ubuntu/.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.4/lib/bundler/setup.rb:17
  /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:59:in `gem_original_require'
  /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:59:in `require'
  /var/lib/gems/1.8/gems/passenger- 4.0.0.rc4/lib/phusion_passenger/loader_shared_helpers.rb:212:in `run_load_path_setup_code'
  /var/lib/gems/1.8/gems/passenger-4.0.0.rc4/helper-scripts/rack-preloader.rb:73:in `preload_app'
  /var/lib/gems/1.8/gems/passenger-4.0.0.rc4/helper-scripts/rack-preloader.rb:127
  </code></pre>
  
  <p>My apache2.conf file has the following additions:</p>
  
  <pre><code>Include sites-enabled/
  &lt;ifmodule mod_ssl.c&gt;
      NameVirtualHost *:443
  &lt;/ifmodule&gt;
  LoadModule passenger_module /var/lib/gems/1.8/gems/passenger 4.0.0.rc4/libout/apache2/mod_passenger.so
     PassengerRoot /var/lib/gems/1.8/gems/passenger-4.0.0.rc4
     PassengerRuby /usr/bin/ruby1.8
  </code></pre>
  
  <p>Edit: ANSWER</p>
  
  <p>I was using sudo to install passenger and apache2 module. Should have just typed:</p>
  
  <pre><code>gem install passenger -pre
  passenger-install-apache2-module
  </code></pre>
  
  <p>WITHOUT sudo.</p>