<?xml version="1.0" encoding="UTF-8"?>
<wiki>
  <body>&lt;h1 id=&quot;setup-download&quot;&gt;Download preference setup&lt;/h1&gt;
&lt;p&gt;The most important of Ray&amp;#8217;s setup tasks, &lt;code&gt;rake ray:setup:download&lt;/code&gt;, will be run for you automatically the first time you try to install an extension. However you might not have had &lt;code&gt;git&lt;/code&gt; installed when you initially installed Ray. If that&amp;#8217;s the case you can change your preference by running:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;rake ray:setup:download&lt;/code&gt;&lt;/pre&gt;
&lt;h1 id=&quot;setup-restart&quot;&gt;Server restart preference setup&lt;/h1&gt;
&lt;p&gt;Ray&amp;#8217;s other setup task, &lt;code&gt;rake ray:setup:restart&lt;/code&gt;, can be used to have Ray automatically restart your server whenever necessary, such as after you install a new extension. Currently, Ray supports restarting a single Mongrel, a Mongrel cluster, Phusion Passenger, Thin or Unicorn; note: single Mongrels, Thin and Unicorn need to be running in daemon mode.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;rake ray:setup:restart server=mongrel_cluster
rake ray:setup:restart server=mongrel
rake ray:setup:restart server=passenger
rake ray:setup:restart server=thin
rake ray:setup:restart server=unicorn&lt;/code&gt;&lt;/pre&gt;
&lt;h1 id=&quot;ext-remote&quot;&gt;Adding extension remotes&lt;/h1&gt;
&lt;p&gt;Before you get going with remote branches in Ray you&amp;#8217;ll need to make sure you&amp;#8217;ve setup at least your GitHub username in your global &lt;code&gt;git&lt;/code&gt; configuration file.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git config --global github.user your_github_username&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That will add a bit of code to your &lt;code&gt;~/.gitconfig&lt;/code&gt; file. Ray can then use that information to determine when you&amp;#8217;re installing your own extensions. Now when you install from your own repositories Ray will use your private &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; instead of the public one; which means you can push your local changes back to your GitHub repository.&lt;/p&gt;
&lt;p&gt;Now you can install your extensions as you normally would with Ray. Then tell Ray which other users you want to track.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;rake ray:extension:install name=extension
rake ray:extension:remote name=extension hub=other_user&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As you add remotes Ray will setup tracking branches named like &amp;#8220;other_user/branch_name&amp;#8221; for each branch the remote user has in their repository. Nothing is merged by Ray and you&amp;#8217;ll be returned to your current branch after the remote is setup. Just like when you&amp;#8217;re using &lt;code&gt;git&lt;/code&gt; directly you&amp;#8217;ll want to &lt;strong&gt;make sure your current branch is clean&lt;/strong&gt; (commit or stash) before adding remotes; and afterward use your normal &lt;code&gt;git&lt;/code&gt; workflow to inspect and merge changes.&lt;/p&gt;
&lt;h1 id=&quot;ext-pull&quot;&gt;Pulling extension remotes&lt;/h1&gt;
&lt;p&gt;Once you&amp;#8217;ve setup a remote repository on an extension you&amp;#8217;ll want to pull down the changes occasionally. You can pull in the remote repositories for either a specific extension or all extensions with remotes setup.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# pull remotes on a single extension
rake ray:extension:pull name=extension_name

# pull remotes on all extensions
rake ray:extension:pull&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Ray does not merge anything into your master branch&lt;/strong&gt;, after pulling in changes use your normal &lt;code&gt;git&lt;/code&gt; workflow to inspect and merge these changes.&lt;/p&gt;</body>
  <created-at type="datetime">2009-11-22T23:43:36-08:00</created-at>
  <id type="integer">118977</id>
  <permalink>advanced-usage</permalink>
  <repository-id type="integer">34113</repository-id>
  <title>Advanced usage</title>
  <updated-at type="datetime">2009-08-20T16:11:01-07:00</updated-at>
  <user-id type="integer">7944</user-id>
</wiki>
