<?xml version="1.0" encoding="UTF-8"?>
<wiki>
  <body>&lt;h2&gt;Initial Deploy&lt;/h2&gt;
&lt;p&gt;The deploy.rb file is already setup, so you can just start deploying without running capify. Of course you&amp;#8217;ll need to configure deploy.rb to point to your server with proper settings. Run these commands on your local to perform your first deploy. You may need to install the gems in the middle there too.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
cap deploy:setup
# setup shared files including configs and assets
cap deploy:cold
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Apache Virtual Host&lt;/h2&gt;
&lt;p&gt;Create the virtual host file in &lt;code&gt;/etc/apache2/sites-available/railscasts&lt;/code&gt;. It should contain something like this.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&amp;lt;VirtualHost *:80&amp;gt;
  ServerName railscasts.com
  DocumentRoot /home/rbates/railscasts.com/current/public
  &amp;lt;Directory &quot;/home/rbates/railscasts.com/current/public&quot;&amp;gt; 
    Options FollowSymLinks 
    AllowOverride None 
    Order allow,deny 
    Allow from all 
  &amp;lt;/Directory&amp;gt; 
&amp;lt;/VirtualHost&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now enable that host, disable the default, and then reload apache.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
sudo a2dissite default
sudo a2ensite railscasts
sudo /etc/init.d/apache2 reload
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now try going to your domain and you should see your rails app!&lt;/p&gt;
&lt;h2&gt;Future Deployments&lt;/h2&gt;
&lt;p&gt;When you make a change, future deployments are really easy. Once you have commited the change and pushed to the git repository, just run &lt;code&gt;cap deploy&lt;/code&gt; or &lt;code&gt;cap deploy:migrations&lt;/code&gt; if you&amp;#8217;ve changed your migrations.&lt;/p&gt;</body>
  <created-at type="datetime">2008-07-22T23:36:06-07:00</created-at>
  <id type="integer">38689</id>
  <permalink>deployment</permalink>
  <repository-id type="integer">15570</repository-id>
  <title>Deployment</title>
  <updated-at type="datetime">2008-07-22T23:36:06-07:00</updated-at>
  <user-id type="integer">161</user-id>
</wiki>
