<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Admoo Labs &#187; Christopher Rigor</title>
	<atom:link href="http://blog.admoolabs.com/author/topher/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.admoolabs.com</link>
	<description>Bringing fun back to the web.</description>
	<lastBuildDate>Sun, 07 Mar 2010 13:45:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Install PHP 5.2 on Ubuntu Dapper</title>
		<link>http://blog.admoolabs.com/install-php-52-ubuntu-dapper/</link>
		<comments>http://blog.admoolabs.com/install-php-52-ubuntu-dapper/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 14:27:26 +0000</pubDate>
		<dc:creator>Christopher Rigor</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[dapper]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.admoolabs.com/?p=105</guid>
		<description><![CDATA[The repositories on Ubuntu Dapper don&#8217;t have php 5.2. To install php 5.2, I added the hardy repositories.
vi /etc/apt/sources.list
add the repositories
deb http://us.archive.ubuntu.com/ubuntu/ hardy main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy main restricted
then run
sudo apt-get update
sudo apt-get install php5
This tried to install and upgrade a lot of packages including apache. I really needed php 5.2 and since the server [...]]]></description>
			<content:encoded><![CDATA[<p>The repositories on Ubuntu Dapper don&#8217;t have php 5.2. To install php 5.2, I added the hardy repositories.</p>
<p><code>vi /etc/apt/sources.list</code></p>
<p>add the repositories<br />
<code>deb http://us.archive.ubuntu.com/ubuntu/ hardy main restricted<br />
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy main restricted</code></p>
<p>then run<br />
<code>sudo apt-get update<br />
sudo apt-get install php5</code></p>
<p>This tried to install and upgrade a lot of packages including apache. I really needed php 5.2 and since the server is a development server, I accepted all the changes.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.admoolabs.com/install-php-52-ubuntu-dapper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sinatra: Suppress Newline in ERB</title>
		<link>http://blog.admoolabs.com/sinatra-suppress-newline-erb/</link>
		<comments>http://blog.admoolabs.com/sinatra-suppress-newline-erb/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 14:18:06 +0000</pubDate>
		<dc:creator>Christopher Rigor</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[erb]]></category>
		<category><![CDATA[sinatra]]></category>

		<guid isPermaLink="false">http://blog.admoolabs.com/?p=97</guid>
		<description><![CDATA[To suppress newline in ERB on Rails, you just add a dash on the closing tag -%>. In Sinatra, as of version 0.9.4, adding a dash doesn&#8217;t work. This has been fixed recently on the tilt gem version 0.3 which Sinatra uses for templates. You also need Sinatra newer than 0.9.4, which doesn&#8217;t exist yet [...]]]></description>
			<content:encoded><![CDATA[<p>To suppress newline in ERB on Rails, you just add a dash on the closing tag -%>. In Sinatra, as of version 0.9.4, adding a dash doesn&#8217;t work. This has been <a href="http://github.com/rtomayko/tilt/commit/7088f3a3e2046d2259f98e6bc531c2fa7857b31c">fixed</a> recently on the tilt gem version 0.3 which Sinatra uses for templates. You also need Sinatra newer than 0.9.4, which doesn&#8217;t exist yet so you need to get Sinatra from source.</p>
<p>You need to get tilt 0.3 from gemcutter.org.<br />
<code>sudo gem install --no-ri --no-rdoc tilt --source=http://gemcutter.org </code></p>
<p>To get the latest Sinatra<br />
<code>cd myapp<br />
git clone git://github.com/sinatra/sinatra.git</code></p>
<p>and add it to the LOAD_PATH<br />
<code> $LOAD_PATH.unshift File.dirname(__FILE__) + '/sinatra/lib'</code></p>
<p>To set the dash as the &#8216;trim&#8217; character, add<br />
<code>set :erb, :trim =&gt; '-'</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.admoolabs.com/sinatra-suppress-newline-erb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RailsConf 2009</title>
		<link>http://blog.admoolabs.com/railsconf-2009/</link>
		<comments>http://blog.admoolabs.com/railsconf-2009/#comments</comments>
		<pubDate>Mon, 04 May 2009 00:18:07 +0000</pubDate>
		<dc:creator>Christopher Rigor</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[railsconf]]></category>

		<guid isPermaLink="false">http://blog.admoolabs.com/?p=94</guid>
		<description><![CDATA[


]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.railsconf.com"><br />
<img src="http://assets.en.oreilly.com/1/event/24/rails2009_210x60.jpg" width="210" height="60"  border="0"  alt="RailsConf 2009" title="RailsConf 2009"  /><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.admoolabs.com/railsconf-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rack::Flash</title>
		<link>http://blog.admoolabs.com/rackflash/</link>
		<comments>http://blog.admoolabs.com/rackflash/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 17:14:46 +0000</pubDate>
		<dc:creator>Christopher Rigor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.admoolabs.com/?p=79</guid>
		<description><![CDATA[One advantage of using rack is having access to rack middleware. rack-flash is a middleware which you can use for flash hash on your rack apps.
If you&#8217;re using sinatra, the syntax is similar to rails. Check out the rack-flash page here.
I added rack-flash to my sinatra app. Check out the git commit. Since rack-flash uses [...]]]></description>
			<content:encoded><![CDATA[<p>One advantage of using rack is having access to rack middleware. rack-flash is a middleware which you can use for flash hash on your rack apps.</p>
<p>If you&#8217;re using sinatra, the syntax is similar to rails. Check out the rack-flash page <a href="http://nakajima.github.com/rack-flash/">here</a>.</p>
<p>I added rack-flash to my <a href="http://blog.admoolabs.com/2009/02/13/sinatra-datamapper-and-haml/">sinatra app</a>. Check out the <a href="http://github.com/crigor/sinatra-movies/commit/08b274cd08387fb71df3930252064e35e666f983">git commit</a>. Since rack-flash uses the session, don&#8217;t forget to add Rack::Session::Cookie.<br />
<script src="http://gist.github.com/81943.js"></script></p>
<p>Watch the video of Jon Crosby&#8217;s talk <a href="http://mwrc2009.confreaks.com/13-mar-2009-11-05-in-a-world-of-middleware-who-needs-monolithic-applications-jon-crosby.html">In a World of Middleware, Who Needs Monolithic Applications?</a> at Mountain West Ruby Conference 2009 for more on rack middleware.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.admoolabs.com/rackflash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sinatra, Datamapper, and Haml</title>
		<link>http://blog.admoolabs.com/sinatra-datamapper-and-haml/</link>
		<comments>http://blog.admoolabs.com/sinatra-datamapper-and-haml/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 10:31:44 +0000</pubDate>
		<dc:creator>Christopher Rigor</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[datamapper]]></category>
		<category><![CDATA[haml]]></category>
		<category><![CDATA[sinatra]]></category>

		<guid isPermaLink="false">http://blog.admoolabs.com/?p=67</guid>
		<description><![CDATA[I recently tried Sinatra and what&#8217;s a better way to learn a new framework than to create an app. 
If you want to learn sinatra, the README will quickly show you what you can do with this framework.
I haven&#8217;t used Datamapper so I took this opportunity to learn it as well. You just need to [...]]]></description>
			<content:encoded><![CDATA[<p>I recently tried <a href="http://www.sinatrarb.com/">Sinatra</a> and what&#8217;s a better way to learn a new framework than to create an app. </p>
<p>If you want to learn sinatra, the <a href="http://www.sinatrarb.com/intro.html">README</a> will quickly show you what you can do with this framework.</p>
<p>I haven&#8217;t used <a href="http://datamapper.org">Datamapper</a> so I took this opportunity to learn it as well. You just need to require &#8216;dm-core&#8217;. That&#8217;s it. If you want to put your models on a separate file, you have to require that as well. If you&#8217;re using Rails, you&#8217;re probably used to models being available right away. I also used <a href="http://haml.hamptoncatlin.com/">haml</a> instead of erb.</p>
<p>The code is available at <a href="http://github.com/crigor/sinatra-movies/tree/master">github</a>.  The <a href="http://www.sinatrarb.com/book.html#real_world_applications_in_sinatra">Sinatra book</a> has a list of Real World Applications. I looked at the <a href="http://github.com/entp/seinfeld/tree/master">seinfeld</a> app as a basis for the structure.</p>
<p>There is more I want to learn in Sinatra. Since it uses Rack, I want to try using the different Rack Middleware available.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.admoolabs.com/sinatra-datamapper-and-haml/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Paperclip</title>
		<link>http://blog.admoolabs.com/paperclip/</link>
		<comments>http://blog.admoolabs.com/paperclip/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 02:55:22 +0000</pubDate>
		<dc:creator>Christopher Rigor</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[attachment]]></category>
		<category><![CDATA[paperclip]]></category>

		<guid isPermaLink="false">http://blog.admoolabs.com/?p=59</guid>
		<description><![CDATA[Paperclip recently made some changes making it more flexible. 
Paperclip is a library for ActiveRecord used for file attachment. The most common use is for uploading images. It can optionally create thumbnails when you upload images. Paperclip requires ImageMagick for resizing images but it doesn&#8217;t require any Ruby libraries like RMagick or MiniMagick.
You can install [...]]]></description>
			<content:encoded><![CDATA[<p>Paperclip <a href="http://giantrobots.thoughtbot.com/2008/12/30/what-good-is-a-flexible-paperclip">recently made some changes</a> making it more flexible. </p>
<p>Paperclip is a library for ActiveRecord used for file attachment. The most common use is for uploading images. It can optionally create thumbnails when you upload images. Paperclip requires ImageMagick for resizing images but it doesn&#8217;t require any Ruby libraries like RMagick or MiniMagick.</p>
<p>You can install paperclip as a gem or as a plugin. The paperclip gem needs right_aws, mocha, and shoulda.<br />
<code>gem install right_aws<br />
gem install mocha<br />
gem install thoughtbot-shoulda --source=http://gems.github.com<br />
gem install thoughtbot-paperclip --source=http://gems.github.com</code></p>
<p>To install the plugin, run <code>./script/plugin install git://github.com/thoughtbot/paperclip.git</code>.</p>
<p>Let&#8217;s say you have a User model and you want to add an avatar. On the users table, you need to add avatar_file_name.</p>
<pre class="brush: ruby;">
class CreateUsers &lt; ActiveRecord::Migration
  def self.up
    create_table :users do |t|
      t.string :login
      t.string :avatar_file_name
    end
  end

  def self.down
    drop_table :users
  end
end
</pre>
<p>On user.rb, add has_attached_file</p>
<pre class="brush: ruby;">
class User &lt; ActiveRecord::Base
  has_attached_file :avatar
end
</pre>
<p>You just need to set avatar to an uploaded file and paperclip will handle the rest.  On app/views/users/new.html.erb</p>
<pre class="brush: ruby;">
  &lt;% form_for :user, @user, :url =&gt; users_path, :html =&gt; { :multipart =&gt; true } do |form| %&gt;
    &lt;%= form.text_field :login %&gt; &lt;br /&gt;
    &lt;%= form.file_field :avatar %&gt; &lt;br /&gt;
    &lt;%= submit_tag 'Save' %&gt;
  &lt;% end %&gt;
</pre>
<p>:multipart  => true is needed when uploading files. Then on app/controllers/users_controller.rb</p>
<pre class="brush: ruby;">
  def new
    @user = User.new
  end

  def create
    @user = User.create(params[:user])
  end
</pre>
<p>@user.avatar.url will give you the url of the uploaded image. That&#8217;s all the code you need to use paperclip. There are more options for creating thumbnails, validating the model, and post-processing.</p>
<p>The uploaded files will be saved on RAILS_ROOT/public/system/:attachment/:id/:style/:basename.:extension. On my computer the file is saved on RAILS_ROOT/public/system/avatars/1/original/image.jpg.</p>
<p>As you can see, the default style is original. To add more &#8217;styles&#8217;, </p>
<pre class="brush: ruby;">
class User &lt; ActiveRecord::Base
  has_attached_file :avatar, :styles =&gt; { :medium =&gt; &quot;300x300&gt;&quot;, :thumb =&gt; &quot;100x100&gt;&quot; }
end
</pre>
<p>When you upload the image, paperclip will save the original image, and resize the image to medium and thumb. On RAILS_ROOT/public/system/avatars/2, you will see the directories original, medium and thumb.</p>
<p>To get the medium and thumb images, you will use @user.avatar.url(:medium) and @user.avatar.url(:thumb).</p>
<p>On the users table, you can also add avatar_content_type (string), avatar_file_size (integer), and avatar_updated_at (datetime). These fields will be populated by paperclip automatically.</p>
<p>I will discuss validation and other post-processing options on my next post.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.admoolabs.com/paperclip/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rack-based Session Stores on Rails</title>
		<link>http://blog.admoolabs.com/rack-based-session-stores-on-rails/</link>
		<comments>http://blog.admoolabs.com/rack-based-session-stores-on-rails/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 17:27:27 +0000</pubDate>
		<dc:creator>Christopher Rigor</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[rack]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://blog.admoolabs.com/?p=21</guid>
		<description><![CDATA[Rails edge is now using Rack-based session stores. That means you can access the same session on any Rack applications. Read about it on the Rails blog.
Nothing changes though on how you use sessions on Rails. On your Rails app, you&#8217;ll have something like

session[:user] = some_user_id

Let&#8217;s see how we can access the same session on [...]]]></description>
			<content:encoded><![CDATA[<p>Rails edge is now using Rack-based session stores. That means you can access the same session on <em>any</em> Rack applications. Read about it on the <a href="http://weblog.rubyonrails.org/2008/12/19/this-week-in-edge-rails">Rails blog</a>.</p>
<p>Nothing changes though on how you use sessions on Rails. On your Rails app, you&#8217;ll have something like</p>
<pre class="brush: ruby;">
session[:user] = some_user_id
</pre>
<p>Let&#8217;s see how we can access the same session on a Rack application. You can read about Rack <a href="http://m.onkey.org/tags/rack">here</a>.</p>
<p>Rack handles session using Rack::Session::Cookie. Create a file config.ru</p>
<pre class="brush: ruby;">
use Rack::Session::Cookie, :key =&gt; '_railssession_session', :domain =&gt; 'railssession.labs.admoolabs.com'
run Proc.new {|env| [200, {&quot;Content-Type&quot; =&gt; &quot;text/html&quot;}, &quot;Rack session 'user' has a value of #{env['rack.session'][:user] || 'nil'}.&quot;]}
</pre>
<p>The key should be the same key that you used on config/environment.rb on your Rails app.</p>
<p>Check out the demo. Set session[:user] on the <a href="http://railssession.labs.admoolabs.com">Rails app</a>, then view the session on the <a href="http://railssession.labs.admoolabs.com/rack">Rack app</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.admoolabs.com/rack-based-session-stores-on-rails/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Capistrano</title>
		<link>http://blog.admoolabs.com/capistrano/</link>
		<comments>http://blog.admoolabs.com/capistrano/#comments</comments>
		<pubDate>Sat, 18 Oct 2008 03:19:35 +0000</pubDate>
		<dc:creator>Christopher Rigor</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.admoolabs.com/?p=19</guid>
		<description><![CDATA[Capistrano is used for &#8220;automating tasks via SSH on remote servers, like software installation, application deployment, configuration management, ad hoc server monitoring, and more.&#8221; It is written in ruby and is commonly used to deploy Rails applications. Capistrano can be used to deploy applications written on any language. It runs commands on remote servers via [...]]]></description>
			<content:encoded><![CDATA[<p>Capistrano is used for &#8220;automating tasks via SSH on remote servers, like software installation, application deployment, configuration management, ad hoc server monitoring, and more.&#8221; It is written in ruby and is commonly used to deploy Rails applications. Capistrano can be used to deploy applications written on any language. It runs commands on remote servers via SSH so it&#8217;s not specific to any language. </p>
<p>I will show you how to use capistrano for deploying a Rails application. The goal is to deploy an application by running one command &#8211; &#8220;cap deploy&#8221;. This should update your code from Subversion, and restart your server.</p>
<p>I assume that you have a rails setup on your server. I use the nginx web server, mongrels and mongrel_cluster.</p>
<p>To install capistrano</p>
<p><code>gem install capistrano</code></p>
<p>To start using capistrano on your Rails application, </p>
<p><code>cd RAILS_ROOT<br />
capify .</code></p>
<p>You should see two files &#8211; Capfile and config/deploy.rb. Capistrano looks for Capfile when you run any capistrano commands. The default Capfile loads config/deploy.rb. deploy.rb contains the settings for your application.</p>
<p>We will deploy the Rails app &#8220;Hello Labs&#8221;. This can be found on our repository. Let&#8217;s edit deploy.rb.</p>
<p>Set the user and runner that will run the commands on your server.</p>
<pre class="brush: ruby;">
set :user, &quot;crigor&quot;
set :runner, &quot;crigor&quot;
</pre>
<p>Set the application name</p>
<pre class="brush: ruby;">
set :application, &quot;hellolabs&quot;
</pre>
<p>Set the scm and repository</p>
<pre class="brush: ruby;">
set :scm, :subversion
set :repository, &quot;http://labs.svn.admoolabs.com/hellolabs/trunk&quot;
</pre>
<p>The default :scm is actually :subversion but I like to put it anyway.</p>
<p>Set the directory on the target server where you will deploy the application.</p>
<pre class="brush: ruby;">
set :deploy_to, &quot;/var/www/#{application}&quot;
</pre>
<p>application is &#8220;hellolabs&#8221; which you set earlier. The deploy_to directory, which I&#8217;ll call DEPLOY_ROOT, is /var/www/hellolabs. You should create this directory on the target server. On Ubuntu, I set the group to www-data so mongrel has access to it.</p>
<p>Set the servers.</p>
<pre class="brush: ruby;">
role :app, 'hello.labs.admoolabs.com'
role :web, 'hello.labs.admoolabs.com'
role :db, 'hello.labs.admoolabs.com', :primary =&gt; true
</pre>
<p>You can also use the IP address instead of the domain.</p>
<p>If nginx, mongrel, and mysql are all on the same server, put the same domain or IP address.</p>
<p>Now we will run our first capistrano task. Make sure /var/www/hellolabs exists on your server. On the RAILS_ROOT, run</p>
<p><code>cap deploy:setup</code></p>
<p>This will create the releases directory and shared directory under the hellolabs directory on the remote server. If you get a permission error, make sure the user you specified has access to /var/www/hellolabs.</p>
<p>Capistrano will ask for you server password. If you don&#8217;t want to enter your password every time you run a capistrano task, you can add</p>
<pre class="brush: ruby;">
set :password, &quot;mypassword&quot;
</pre>
<p>Check if we have met the dependencies.</p>
<p><code>cap deploy:check</code></p>
<p>The output, if deploy:check is successful, looks like <a href="http://pastie.org/private/rxjc15o4urqrncdndujda">this</a>.</p>
<p>Before we deploy the app, we define the deploy:restart task. By default capistrano runs /var/www/hellolabs/current/script/process/reaper. I use mongrel and mongrel_cluster so let&#8217;s add</p>
<pre class="brush: ruby;">
namespace :deploy do
  desc &quot;Restart the mongrels&quot;
  task :restart do
    run &quot;mongrel_rails cluster::restart -C #{shared_path}/config/mongrel_cluster.yml&quot;
  end
end
</pre>
<p>Create the /var/www/hellolabs/shared/config directory and add <a href="http://pastie.org/private/4jtneipchwzuzwxxsgbkw">mongrel_cluster.yml</a>. We also need to add database.yml. I don&#8217;t commit database.yml in my repository since it contains the database password.</p>
<p>We have to symlink mongrel_cluster.yml and database.yml every time we deploy.</p>
<pre class="brush: ruby;">
after &quot;deploy:update_code&quot;, &quot;deploy:symlink_configs&quot;
namespace :deploy do
  desc &quot;Symlink the config files.&quot;
  task :symlink_configs do
    run &quot;ln -nfs #{shared_path}/config/database.yml #{latest_release}/config/database.yml&quot;
    run &quot;ln -nfs #{shared_path}/config/mongrel_cluster.yml #{latest_release}/config/mongrel_cluster.yml&quot;
  end
end
</pre>
<p>We&#8217;re now ready to deploy our application.</p>
<p><code>cap deploy</code></p>
<p>If you see something similar to <a href="http://pastie.org/private/lcuxzhrofl8fpiupdpmijg">this</a>, your app has been deployed. </p>
<p>The releases directory will contain directories with the timestamp as the name like 20081017125102 and 20081017132929. These directories will contain the rails application.</p>
<p>Below, you can see that current is a symlink to 20081017132929. /var/www/hellolabs/current is your RAILS_ROOT.</p>
<p><a href='http://blog.admoolabs.com/wp-content/uploads/2008/10/cap_directory_structure.jpg' title='cap_directory_structure.jpg'><img src='http://blog.admoolabs.com/wp-content/uploads/2008/10/cap_directory_structure.jpg' alt='cap_directory_structure.jpg' /></a></p>
<div style='clear:both'></div>
<p>Check the URL of your app. <a href="http://hello.labs.admoolabs.com/">http://hello.labs.admoolabs.com</a></p>
<p>If you need a username and password to checkout your repostory, add</p>
<pre class="brush: ruby;">
set :scm_username, &quot;username&quot;
set :scm_password, &quot;password&quot;
</pre>
<p>To get the list of capistrano tasks available, run <code>cap -T</code>.</p>
<p>For more information, check the <a href="http://capify.org/">capistrano website</a>.</p>
<p>Here is the complete deploy.rb</p>
<pre class="brush: ruby;">
set :user, &quot;crigor&quot;
set :runner, &quot;crigor&quot;

set :application, &quot;hellolabs&quot;
set :scm, :subversion
set :repository, &quot;http://labs.svn.admoolabs.com/hellolabs/trunk&quot;
set :deploy_to, &quot;/var/www/#{application}&quot;

role :app, 'hello.labs.admoolabs.com'
role :web, 'hello.labs.admoolabs.com'
role :db, 'hello.labs.admoolabs.com', :primary =&gt; true

after &quot;deploy:update_code&quot;, &quot;deploy:symlink_configs&quot;
namespace :deploy do
  desc &quot;Symlink the config files.&quot;
  task :symlink_configs do
    run &quot;ln -nfs #{shared_path}/config/database.yml #{latest_release}/config/database.yml&quot;
    run &quot;ln -nfs #{shared_path}/config/mongrel_cluster.yml #{latest_release}/config/mongrel_cluster.yml&quot;
  end

  desc &quot;Restart the mongrels&quot;
  task :restart do
    run &quot;mongrel_rails cluster::restart -C #{shared_path}/config/mongrel_cluster.yml&quot;
  end
end
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.admoolabs.com/capistrano/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Railsconf 2008</title>
		<link>http://blog.admoolabs.com/railsconf-2008/</link>
		<comments>http://blog.admoolabs.com/railsconf-2008/#comments</comments>
		<pubDate>Mon, 12 May 2008 15:23:47 +0000</pubDate>
		<dc:creator>Christopher Rigor</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://blog.admoolabs.com/?p=16</guid>
		<description><![CDATA[I will be at Railsconf 2008 at Portland. I still haven&#8217;t finalized the sessions I&#8217;m attending but I&#8217;m sure it will be great.



]]></description>
			<content:encoded><![CDATA[<p>I will be at Railsconf 2008 at Portland. I still haven&#8217;t finalized the sessions I&#8217;m attending but I&#8217;m sure it will be great.</p>
<p><a href="http://conferences.oreilly.com/rails/"><br />
<img src="http://conferences.oreillynet.com/banners/rails/promote/336x280.gif" width="336" height="280"  border="0"  alt="RailsConf 2008" title="RailsConf 2008"  /><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.admoolabs.com/railsconf-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PNOI Judge</title>
		<link>http://blog.admoolabs.com/pnoi-judge/</link>
		<comments>http://blog.admoolabs.com/pnoi-judge/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 16:23:58 +0000</pubDate>
		<dc:creator>Christopher Rigor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.admoolabs.com/?p=14</guid>
		<description><![CDATA[The first Philippine National Olympiad in Informatics (PNOI 2008) will be held on March 15, 2008 at Ateneo de Manila University, Loyola Heights, Quezon City.
PNOI is an individual programming contest for high school students. I&#8217;m a judge (and 4 others) at this contest.
Click here for the details.
]]></description>
			<content:encoded><![CDATA[<p>The first Philippine National Olympiad in Informatics (PNOI 2008) will be held on March 15, 2008 at Ateneo de Manila University, Loyola Heights, Quezon City.</p>
<p>PNOI is an individual programming contest for high school students. I&#8217;m a judge (and 4 others) at this contest.</p>
<p>Click <a href="http://mathsci.math.admu.edu.ph/pnoi/">here</a> for the details.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.admoolabs.com/pnoi-judge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
