title: Loading rails env in production
body: <p>I have deployed a new Rails site to a Linux VM using Capistrano. I am using nginx as the front end and running my Rails app using unicorn.</p>
  
  <p>If I try to run <code>rake routes</code> on the server, I get an error telling me that Rails is not installed, even though Rails is installed. The problem seems to be that the gem search directory is different for the app and the logged in user.</p>
  
  <p>How do I load the Rails environment that my app is seeing as the logged in user?</p>