<?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>Raymond Law &#187; Ruby on Rails</title>
	<atom:link href="http://rayvinly.com/articles/category/rubyonrails/feed/" rel="self" type="application/rss+xml" />
	<link>http://rayvinly.com</link>
	<description>Badminton on Rails</description>
	<lastBuildDate>Sun, 04 Apr 2010 05:18:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using Paperclip with Passenger</title>
		<link>http://rayvinly.com/articles/2010/03/04/using-paperclip-with-passenger/</link>
		<comments>http://rayvinly.com/articles/2010/03/04/using-paperclip-with-passenger/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 00:50:21 +0000</pubDate>
		<dc:creator>Raymond Law</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[paperclip]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://rayvinly.com/?p=204</guid>
		<description><![CDATA[This is mainly a note to myself.  File upload with Paperclip works with script/server but not when running Passenger.  I have been lazy in finding a solution, so I just switch between script/server and Passenger, but I finally can&#8217;t stand it.

It happens because /opt/local/bin/identify is not in the path for the www user [...]]]></description>
			<content:encoded><![CDATA[<p>This is mainly a note to myself.  File upload with Paperclip works with script/server but not when running Passenger.  I have been lazy in finding a solution, so I just switch between script/server and Passenger, but I finally can&#8217;t stand it.</p>

<p>It happens because /opt/local/bin/identify is not in the path for the www user which is used to run Apache on Leopard. The solution is just to make it so in environment.rb (Make sure the path is correct for both the local dev and live prod hosts):</p>


<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;">Paperclip.<span style="color:#9900CC;">options</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:command_path</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">&quot;/opt/local/bin&quot;</span></pre></div></div>
<script src="http://feeds.feedburner.com/~s/rayvinly?i=http://rayvinly.com/articles/2010/03/04/using-paperclip-with-passenger/" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://rayvinly.com/articles/2010/03/04/using-paperclip-with-passenger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails Rumble 2009</title>
		<link>http://rayvinly.com/articles/2009/08/25/rails-rumble-2009/</link>
		<comments>http://rayvinly.com/articles/2009/08/25/rails-rumble-2009/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 03:54:39 +0000</pubDate>
		<dc:creator>Raymond Law</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[railsrumble]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://rayvinly.com/?p=195</guid>
		<description><![CDATA[I participated in last year&#8217;s Rails Rumble and decided to do it again this year.  Our app this year is MovieTwitvia, a fun twitter movie trivia app.  I don&#8217;t really have any new thoughts than last year.  However, Andrew Ng, one of our team members have written up a post about his [...]]]></description>
			<content:encoded><![CDATA[<p>I participated in last year&#8217;s Rails Rumble and decided to do it again this year.  Our app this year is <a href="http://movietwitvia.com/">MovieTwitvia</a>, a fun twitter movie trivia app.  I don&#8217;t really have any new thoughts than <a href="http://rayvinly.com/articles/2008/10/19/railsrumble-2008/">last year</a>.  However, <a href="http://blog.andrewng.com/2009/08/24/railsrumble-09/">Andrew Ng</a>, one of our team members have written up a post about his thoughts.</p><script src="http://feeds.feedburner.com/~s/rayvinly?i=http://rayvinly.com/articles/2009/08/25/rails-rumble-2009/" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://rayvinly.com/articles/2009/08/25/rails-rumble-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PayPal Recurring Billing with ActiveMerchant in Ruby on Rails</title>
		<link>http://rayvinly.com/articles/2009/02/20/paypal-recurring-billing-with-activemerchant-in-ruby-on-rails/</link>
		<comments>http://rayvinly.com/articles/2009/02/20/paypal-recurring-billing-with-activemerchant-in-ruby-on-rails/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 19:19:40 +0000</pubDate>
		<dc:creator>Raymond Law</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[activemerchant]]></category>
		<category><![CDATA[billing]]></category>
		<category><![CDATA[paypal]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[recurring]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://rayvinly.com/?p=87</guid>
		<description><![CDATA[ActiveMerchant is great and PayPal is easy to use.  A lot of us already have a PayPal account for EBay.  It works great in auctions where you pay once.  However, ActiveMerchant currently does not support PayPal recurring billing.  One requirement of a recent project is to be able to charge for [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.activemerchant.org/">ActiveMerchant</a> is great and <a href="https://developer.paypal.com/">PayPal</a> is easy to use.  A lot of us already have a PayPal account for EBay.  It works great in auctions where you pay once.  However, ActiveMerchant currently does not support PayPal recurring billing.  One requirement of a recent project is to be able to charge for a monthly or yearly subscription plan with PayPal.  Therefore, I did some googling and found that <a href="http://clockobj.co.uk/2008/09/08/ruby-on-rails-paypal-express-recurring-payments-using-active-merchant/">Jon Baker</a> has already extended ActiveMerchant to add this functionality using PayPal&#8217;s Name-Value Pair (NVP) <span class="caps">API.</span> However, as <a href="http://jadedpixel.lighthouseapp.com/projects/11599-active-merchant/tickets/17-patch-creating-paypal-recurring-payments-profile-with-activemerchant">Cody Fauser</a> pointed out, the <span class="caps">NVP API </span>was taken out from ActiveMerchant, so I had to implement that with PayPal&#8217;s <span class="caps">SOAP API.</span></p>

<p><del datetime="2009-03-31T14:53:20+00:00">First, download this <a href="http://rayvinly.com/wp-content/uploads/2009/03/paypal_express_recurring.rb">file</a> and put it in <em>vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/</em>.</del>  Use the GitHub from now because maintaining a separate file download is too troublesome.  Alternatively, there&#8217;s a fork on GitHub at <a href="http://github.com/rayvinly/active_merchant/" target="_blank">http://github.com/rayvinly/active_merchant/</a>.</p>

<p>In your controller, after a user selects one of your subscription plan, the form goes to the checkout action:</p>


<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;">  <span style="color:#9966CC; font-weight:bold;">def</span> checkout
    response = gateway.<span style="color:#9900CC;">setup_agreement</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:description</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> description, <span style="color:#ff3333; font-weight:bold;">:return_url</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> return_url, <span style="color:#ff3333; font-weight:bold;">:cancel_return_url</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> cancel_return_url<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#5A0A0A; font-weight:bold;">redirect_to</span> gateway.<span style="color:#9900CC;">redirect_url_for</span><span style="color:#006600; font-weight:bold;">&#40;</span>response.<span style="color:#9900CC;">token</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>




<p>This redirects the user to PayPal so he can login and read the <em>description</em> you provided.  After he confirms, he is redirected back to your application&#8217;s <em>return_url</em>, which I set it to be the complete action below.  If he cancels, he is redirected back to the <em>cancel_return_url</em>.  You can set <em>cancel_return_url</em> to be the plan selection page where he can choose a different plan.</p>

<p>If he confirms, here&#8217;s the complete action:</p>


<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;">  <span style="color:#9966CC; font-weight:bold;">def</span> complete
    token = params<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:token</span><span style="color:#006600; font-weight:bold;">&#93;</span>
    response = gateway.<span style="color:#9900CC;">create_profile</span><span style="color:#006600; font-weight:bold;">&#40;</span>token, <span style="color:#ff3333; font-weight:bold;">:description</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> description, <span style="color:#ff3333; font-weight:bold;">:start_date</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> start_date, <span style="color:#ff3333; font-weight:bold;">:frequency</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> frequency_in_months, <span style="color:#ff3333; font-weight:bold;">:amount</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> amount_in_dollars, <span style="color:#ff3333; font-weight:bold;">:auto_bill_outstanding</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
    <span style="color:#008000; font-style:italic;"># Save this profile_id in your transactions table.  This is used to cancel/modify the plan in the future.</span>
    profile_id = response.<span style="color:#9900CC;">params</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;profile_id&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
&nbsp;
    <span style="color:#9966CC; font-weight:bold;">if</span> response.<span style="color:#9900CC;">success</span>?
      <span style="color:#5A0A0A; font-weight:bold;">flash</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:notice</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">&quot;Your PayPal account was successfully set up for the &lt;strong&gt;#{description}&lt;/strong&gt; payment plan.&quot;</span>
      <span style="color:#5A0A0A; font-weight:bold;">redirect_to</span> login_path
    <span style="color:#9966CC; font-weight:bold;">else</span>
      <span style="color:#5A0A0A; font-weight:bold;">flash</span>.<span style="color:#9900CC;">now</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:notice</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">&quot;There was a problem setting up your PayPal account for the &lt;strong&gt;#{description}&lt;/strong&gt; payment plan&quot;</span>
      <span style="color:#5A0A0A; font-weight:bold;">render</span> cancel_url
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>




<p>I default the <em>frequency</em> to be in months and turn on <em>auto_bill_outstanding</em> because that is what I need, but you can look at the file you downloaded and the PayPal documentation to see what other options are available.  In particular, read these two <span class="caps">PDF</span>s:</p>

<ul>
	<li><a href="https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_ExpressCheckout_IntegrationGuide.pdf">Express Checkout Integration Guide</a>
</li>
	<li><a href="https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_API_Reference.pdf"><span class="caps">SOAP API</span> Developer Reference</a>
</li>
</ul>

<p>If the user wants to cancel the payment plan, a cancel action would look like:</p>


<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;">  <span style="color:#9966CC; font-weight:bold;">def</span> cancel
    response = gateway.<span style="color:#9900CC;">cancel_profile</span><span style="color:#006600; font-weight:bold;">&#40;</span>paypal_profile_id, <span style="color:#ff3333; font-weight:bold;">:note</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'Payment plan was canceled by user'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#5A0A0A; font-weight:bold;">flash</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:notice</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">'You have successfully canceled your membership'</span>
  <span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>




<p><em>paypal_profile_id</em> is the profile_id you saved in the complete action from above.  Keeping this profile_id is very handy.</p>

<p>That&#8217;s it.  Enjoy making money!</p>

<p><strong><em><span class="caps">UPDATE</span> 2009-02-04</em></strong></p>

<p>I updated the extension to include a <em>credit_card</em> hash.  You will probably capture the credit card details submitted by the user in a form as in <em>params[:credit_card]</em>, but I will just create a hash to show as an example.  To make recurring payment with a credit card, just pass nil for the token (this is required, because PayPal would use the token in preference to the credit card).  Pass the <em>credit_card</em> hash as follows:</p>


<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;">    credit_card = <span style="color:#CC00FF; font-weight:bold;">Hash</span>.<span style="color:#5A0A0A; font-weight:bold;">new</span>
    credit_card<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:type</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">'Visa'</span>
    credit_card<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:number</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">'1234567812345678'</span>
    credit_card<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:exp_month</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">'07'</span>
    credit_card<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:exp_year</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">'2016'</span>
    credit_card<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:cvv2</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">'123'</span>
    credit_card<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:card_owner</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">'John Doe'</span>
    response = gateway.<span style="color:#9900CC;">create_profile</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">nil</span>, <span style="color:#ff3333; font-weight:bold;">:credit_card</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> credit_card, <span style="color:#ff3333; font-weight:bold;">:description</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> description, <span style="color:#ff3333; font-weight:bold;">:start_date</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> start_date, <span style="color:#ff3333; font-weight:bold;">:frequency</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> frequency, <span style="color:#ff3333; font-weight:bold;">:amount</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> amount, <span style="color:#ff3333; font-weight:bold;">:auto_bill_outstanding</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>




<p>However, I got the famous <strong><span class="caps">DPRP </span>is disabled for this merchant</strong> error message when I tested it.  I did a little googling but I haven&#8217;t found the cause.  There may just be something that you have to turn on in your PayPal developer account.  I also read that it works for newer accounts only.  But since I don&#8217;t have a need for this, I didn&#8217;t look further.  If you guys know, please let me know.  I will try to update the extension as soon as possible to make it work with a credit card.</p><script src="http://feeds.feedburner.com/~s/rayvinly?i=http://rayvinly.com/articles/2009/02/20/paypal-recurring-billing-with-activemerchant-in-ruby-on-rails/" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://rayvinly.com/articles/2009/02/20/paypal-recurring-billing-with-activemerchant-in-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>42</slash:comments>
		</item>
		<item>
		<title>Sanitize your output in Ruby on Rails</title>
		<link>http://rayvinly.com/articles/2008/10/30/sanitize-your-output-in-ruby-on-rails/</link>
		<comments>http://rayvinly.com/articles/2008/10/30/sanitize-your-output-in-ruby-on-rails/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 14:43:02 +0000</pubDate>
		<dc:creator>Raymond Law</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[footnotes]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[safe_erb]]></category>
		<category><![CDATA[sanitize]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[We all know about the holy h() method that escapes your output when you do .  But how many of us can claim we remember to use it where it&#8217;s appropriate during development 100% of the time?  Can you swear you&#8217;ve never missed one?  Moreover, it&#8217;s such a mental distraction to think [...]]]></description>
			<content:encoded><![CDATA[<p>We all know about the holy h() method that escapes your output when you do <%=h blah %>.  But how many of us can claim we remember to use it where it&#8217;s appropriate during development 100% of the time?  Can you swear you&#8217;ve never missed one?  Moreover, it&#8217;s such a mental distraction to think logic and h() at the same time.  And when you take over a Rails project in the middle, how can you ensure the previous developers use h()?</p>

<p>Here&#8217;s the rescue.</p>

<p><a href="http://github.com/pelargir/safe_erb">safe_erb</a> + <a href="http://github.com/drnic/rails-footnotes">footnotes</a></p>

<p>I don&#8217;t think I need to explain more.  Just use it and you will find all those places where you should sanitize your output with h(), sanitize(), and untaint(), &#8230;etc.</p><script src="http://feeds.feedburner.com/~s/rayvinly?i=http://rayvinly.com/articles/2008/10/30/sanitize-your-output-in-ruby-on-rails/" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://rayvinly.com/articles/2008/10/30/sanitize-your-output-in-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>RailsRumble 2008</title>
		<link>http://rayvinly.com/articles/2008/10/19/railsrumble-2008/</link>
		<comments>http://rayvinly.com/articles/2008/10/19/railsrumble-2008/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 20:05:40 +0000</pubDate>
		<dc:creator>Raymond Law</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[railsrumble]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[We just finished the Lyricist application for RailsRumble 2008 with 3 other Intridea folks.  Here are some observations:



Keep the idea small and achievable &#8211; There are only 48 hours, so you can&#8217;t build the next Google.  And there&#8217;s pressure.  Try to keep your idea small and make sure you can accomplish it. [...]]]></description>
			<content:encoded><![CDATA[<p>We just finished the <a href="http://lyricistapp.com">Lyricist</a> application for <a href="http://railsrumble.com">RailsRumble 2008</a> with 3 other <a href="http://intridea.com">Intridea</a> folks.  Here are some observations:</p>


<ul>
<li><strong>Keep the idea small and achievable</strong> &#8211; There are only 48 hours, so you can&#8217;t build the next Google.  And there&#8217;s pressure.  Try to keep your idea small and make sure you can accomplish it.  You have to deploy a finished product in order to have any chance of winning.  So stop day dreaming about cool extra features because you won&#8217;t get that implemented.</li>
</ul>




<ul>
<li><strong>Prior planning is the key</strong> &#8211; We barely had any because we had decided on the idea the day before the rumble began.  When the competition started, people don&#8217;t know who&#8217;s doing what and it was kinda a mess.  Fortunately we had a campfire room where all conversation happen, so we can kind of iron out the issues.  However, better preparation and team cohesiveness would have helped a great deal in communication.</li>
</ul>




<ul>
<li><strong>Deploy early</strong> &#8211; I&#8217;ve seen too many deployment problems came up before, so I took the initiative to make sure we could deploy as soon as the competition began.  It helped tremendously because we never had to worry about if we could deploy before time expired.  While you are fixing last minute bugs and the pressure, it would have been tough to set up a server and deploy flawlessly.</li>
</ul>




<ul>
<li><strong>A lot of scaffolding</strong> &#8211; I took full advantage of Rails scaffolding.  There&#8217;s just no time to reinvent the wheels when all the restful model and controller methods are already available with just one command.  You use plugins and gems for the same reason, right?  So, don&#8217;t be stupid.</li>
</ul>




<ul>
<li><strong>Conflicts</strong> &#8211; The bigger your team, the more conflicts there would be when people check in and out.  We were writing a new application, so people were editing the same files.  Now, if you organize and assign work to people as in a regular project, conflicts don&#8217;t usually happen and even if they do occur, it is trivial to resolve.  However, when you are rumbling, you will step on one another&#8217;s toes.  I can guarantee you that.</li>
</ul>




<ul>
<li><strong>Forget about writing tests</strong> &#8211; Look, I am in support of agile and test-driven development, with one exception.  That is, you are not participating in RailsRumble.  There&#8217;s just no time for it.  If you are a good enough programmer, you can build a small application with no tests.  If you can&#8217;t, I don&#8217;t want to work with you.  Writing tests for a new application starting from scratch in just 48 hours is simple not feasible.  No bargain!</li>
</ul>




<ul>
<li><strong>No ticketing system like Unfuddle and Lighthouse</strong> &#8211; One team member had tried to use Unfuddle to create tickets to get ourselves more organized.  While it was a sincere attempt, it simply didn&#8217;t work.  There&#8217;s no time to accept a ticket, create a new ticket, &#8230;  We pretty much abandoned it soon after we started.</li>
</ul>




<ul>
<li><strong>Nice to have a designer</strong>: &#8211; It is very nice if you have a designer on you team because it&#8217;s hard to wear two hats in 48 hours.  Design work can draw your focus away from development.</li>
</ul>



<p>Now that I&#8217;ve given you my insights for next year&#8217;s RailsRumble.  As a token of appreciation, please <a href="http://railsrumble.com/teams/the-unstable-isotopes">vote for us</a>!</p>

<p><strong><span class="caps">UPDATE</span> 2008/10/20</strong></p>

<p><em>One more thought on RailsRumble the day after:</em></p>

<p>Numerous projects that I worked with before never deploy quickly, let alone in 48 hours.  I think it&#8217;s refreshing and rewarding to have something built and deployed so quickly.  It is true that we have to cut many features in order to deploy a first version, but lesser is better than never.  I think many other projects can try to deploy early and often and just go through more iterations and get feedbacks from users and customers.  The whole application doesn&#8217;t need to be finished.  Even if you only have login and logout, you can still deploy.  Add the next feature, deploy again.  That way, you aren&#8217;t keeping the features to yourself.  You can get feedback from users to see what improvements they are looking for and may even lead you to implement the real features that they truly want.</p><script src="http://feeds.feedburner.com/~s/rayvinly?i=http://rayvinly.com/articles/2008/10/19/railsrumble-2008/" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://rayvinly.com/articles/2008/10/19/railsrumble-2008/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Capistrano Deployment Recipes</title>
		<link>http://rayvinly.com/articles/2008/08/04/capistrano-deployment-recipes/</link>
		<comments>http://rayvinly.com/articles/2008/08/04/capistrano-deployment-recipes/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 16:55:08 +0000</pubDate>
		<dc:creator>Raymond Law</dc:creator>
				<category><![CDATA[Dealistic]]></category>
		<category><![CDATA[Entrepreneurship]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[slicehost]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Dealistic was first deployed to Slicehost when we were testing it on staging.  However, I only got the 256 slice and low memory is a big problem for Ruby and Mongrel.  We&#8217;ve moved to Amazon EC2 when we launched.  It is running rock solid and we don&#8217;t run out of memory again, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://dealistic.com/">Dealistic</a> was first deployed to <a href="http://www.slicehost.com/">Slicehost</a> when we were testing it on staging.  However, I only got the 256 slice and low memory is a big problem for Ruby and Mongrel.  We&#8217;ve moved to <a href="http://www.amazon.com/gp/browse.html?node=201590011">Amazon <span class="caps">EC2</span></a> when we launched.  It is running rock solid and we don&#8217;t run out of memory again, at least for now <img src='http://rayvinly.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>

<p>As a result of all these, I wrote two <a href="http://www.capify.org/">Capistrano</a> recipes for deployment, for both Slicehost and <span class="caps">EC2. </span> We also use <a href="http://github.com/">GitHub</a> for version control.  I think these deployment recipes may be helpful to others.  So here they are:</p>


<ul>
<li><a href="http://rayvinly.com/wp-content/uploads/2009/02/deploy_slicehost.rb">deploy.rb for Slicehost</a></li>
<li><a href="http://rayvinly.com/wp-content/uploads/2009/02/deploy_ec2.rb">deploy.rb for <span class="caps">EC2</span></a></li>
</ul>



<p>We wrote some custom Capistrano tasks to copy over configuration files, symlink plugins, start/stop <a href="http://backgroundrb.rubyforge.org/">BackgrounDRb</a>, and a custom maintenance page.  But these things are optional.  It should be simple to add/remove things as you see fit.</p><script src="http://feeds.feedburner.com/~s/rayvinly?i=http://rayvinly.com/articles/2008/08/04/capistrano-deployment-recipes/" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://rayvinly.com/articles/2008/08/04/capistrano-deployment-recipes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dealistic is launched</title>
		<link>http://rayvinly.com/articles/2008/07/29/dealistic-is-launched/</link>
		<comments>http://rayvinly.com/articles/2008/07/29/dealistic-is-launched/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 02:42:01 +0000</pubDate>
		<dc:creator>Raymond Law</dc:creator>
				<category><![CDATA[Dealistic]]></category>
		<category><![CDATA[Entrepreneurship]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[buy]]></category>
		<category><![CDATA[coupon]]></category>
		<category><![CDATA[deal]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[

Andrew and I have been working on a new site Dealistic after our work at OnMyList.

We&#8217;ve also put up a screencast to show off our features (HUGE thanks to Sherry)

				

It lets you find deals by specifying a list of tags and it can notify you by email, RSS feed, and/or SMS when new deals appear [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://dealistic.com/images/logo.gif" alt="" /></p>

<p><a href="http://blog.andrewng.com">Andrew</a> and I have been working on a new site <a href="http://dealistic.com">Dealistic</a> after our work at <a href="http://www.onmylist.com">OnMyList</a>.</p>

<p>We&#8217;ve also put up a screencast to show off our features (HUGE thanks to <a href="http://sherrysun.com/">Sherry</a>)</p>

<p><object width="400" height="300">	<param name="allowfullscreen" value="true" />	<param name="allowscriptaccess" value="always" />	<param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=1427503&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" />	<embed src="http://www.vimeo.com/moogaloop.swf?clip_id=1427503&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object></p>

<p>It lets you find deals by specifying a list of tags and it can notify you by email, <span class="caps">RSS </span>feed, and/or <span class="caps">SMS </span>when new deals appear that match your tags.</p>

<p>We made the site because we often need to find deals on things we want to buy but we spend way too much time looking for irrelevant deals on a lot of different sites.  With <a href="http://dealistic.com">Dealistic</a>, what you get is what you want.</p>

<p><strong>Never miss a deal because you don&#8217;t have time to find it!  Just add a tag at <a href="http://dealistic.com">Dealistic</a> and we will let you know when a deal that you are looking for appears.</strong></p>

<p>We also have a <a href="http://getsatisfaction.com/dealisticcom">feedback tool</a> that we hope you can give us suggestions to do better.</p><script src="http://feeds.feedburner.com/~s/rayvinly?i=http://rayvinly.com/articles/2008/07/29/dealistic-is-launched/" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://rayvinly.com/articles/2008/07/29/dealistic-is-launched/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby Performance Benchmarking</title>
		<link>http://rayvinly.com/articles/2008/07/09/ruby-performance-benchmarking/</link>
		<comments>http://rayvinly.com/articles/2008/07/09/ruby-performance-benchmarking/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 21:02:12 +0000</pubDate>
		<dc:creator>Raymond Law</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Courtesy of igvita.com


require 'benchmark'
&#160;
n = 1000000
Benchmark.bm do &#124;x&#124;
  x.report&#40;'copy'&#41; &#123; n.times do ; h = &#123;&#125;; h = h.merge&#40;&#123;1 =&#62; 2&#125;&#41;; end &#125;
&#160;
  x.report&#40;'no copy'&#41; &#123; n.times do ; h = &#123;&#125;; h.merge!&#40;&#123;1 =&#62; 2&#125;&#41;; end &#125;
&#160;
  x.report&#40;'map(&#38;:id)'&#41; do
    n.times do &#124;i&#124;
      h = [...]]]></description>
			<content:encoded><![CDATA[<p>Courtesy of <a href="http://www.igvita.com/2008/07/08/6-optimization-tips-for-ruby-mri/">igvita.com</a></p>


<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'benchmark'</span>
&nbsp;
n = <span style="color:#006666;">1000000</span>
<span style="color:#CC00FF; font-weight:bold;">Benchmark</span>.<span style="color:#9900CC;">bm</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>x<span style="color:#006600; font-weight:bold;">|</span>
  x.<span style="color:#9900CC;">report</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'copy'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> n.<span style="color:#9900CC;">times</span> <span style="color:#9966CC; font-weight:bold;">do</span> ; h = <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">&#125;</span>; h = h.<span style="color:#9900CC;">merge</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006666;">1</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">2</span><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#9966CC; font-weight:bold;">end</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
  x.<span style="color:#9900CC;">report</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'no copy'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> n.<span style="color:#9900CC;">times</span> <span style="color:#9966CC; font-weight:bold;">do</span> ; h = <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">&#125;</span>; h.<span style="color:#9900CC;">merge</span>!<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006666;">1</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">2</span><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#9966CC; font-weight:bold;">end</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
  x.<span style="color:#9900CC;">report</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'map(&amp;:id)'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    n.<span style="color:#9900CC;">times</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>i<span style="color:#006600; font-weight:bold;">|</span>
      h = <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
      h.<span style="color:#9900CC;">map</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&amp;</span>:object_id<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  x.<span style="color:#9900CC;">report</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'map { |i| i.id }'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    n.<span style="color:#9900CC;">times</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>i<span style="color:#006600; font-weight:bold;">|</span>
      h = <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
      h.<span style="color:#9900CC;">map</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>e<span style="color:#006600; font-weight:bold;">|</span> e.<span style="color:#9900CC;">object_id</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>




<p>In Rails script/console or Ruby 1.9:</p>


<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#006600; font-weight:bold;">&gt;&gt;</span> <span style="color:#CC0066; font-weight:bold;">load</span> <span style="color:#996600;">'/Users/rlaw/Desktop/bm.rb'</span>
      user     <span style="color:#CC0066; font-weight:bold;">system</span>      total        real
copy  <span style="color:#006666;">4.000000</span>   <span style="color:#006666;">0.020000</span>   <span style="color:#006666;">4.020000</span> <span style="color:#006600; font-weight:bold;">&#40;</span>  <span style="color:#006666;">4.081549</span><span style="color:#006600; font-weight:bold;">&#41;</span>
no copy  <span style="color:#006666;">2.780000</span>   <span style="color:#006666;">0.010000</span>   <span style="color:#006666;">2.790000</span> <span style="color:#006600; font-weight:bold;">&#40;</span>  <span style="color:#006666;">2.818923</span><span style="color:#006600; font-weight:bold;">&#41;</span>
map<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&amp;</span>:id<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006666;">10.880000</span>   <span style="color:#006666;">0.040000</span>  <span style="color:#006666;">10.920000</span> <span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#006666;">11.094024</span><span style="color:#006600; font-weight:bold;">&#41;</span>
map <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>i<span style="color:#006600; font-weight:bold;">|</span> i.<span style="color:#9900CC;">id</span> <span style="color:#006600; font-weight:bold;">&#125;</span>  <span style="color:#006666;">2.060000</span>   <span style="color:#006666;">0.020000</span>   <span style="color:#006666;">2.080000</span> <span style="color:#006600; font-weight:bold;">&#40;</span>  <span style="color:#006666;">2.178544</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span></pre></div></div>
<script src="http://feeds.feedburner.com/~s/rayvinly?i=http://rayvinly.com/articles/2008/07/09/ruby-performance-benchmarking/" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://rayvinly.com/articles/2008/07/09/ruby-performance-benchmarking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deploying your Rails applications with Phusion Passenger</title>
		<link>http://rayvinly.com/articles/2008/06/11/deploying-your-rails-applications-with-phusion-passenger/</link>
		<comments>http://rayvinly.com/articles/2008/06/11/deploying-your-rails-applications-with-phusion-passenger/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 12:43:06 +0000</pubDate>
		<dc:creator>Raymond Law</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[deploy]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[phusion]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[There have been several methods to deploy an Ruby on Rails application.  Until recently, the most popular is to run Apache and proxy balance to multiple Mongrel instances that are running simultaneously.

Passenger, developed by Phusion, is the new kid entering the Rails deployment market.  We have been using the Apache PHP module for [...]]]></description>
			<content:encoded><![CDATA[<p>There have been several methods to deploy an Ruby on Rails application.  Until recently, the most popular is to run Apache and proxy balance to multiple Mongrel instances that are running simultaneously.</p>

<p><a href="http://www.modrails.com/">Passenger</a>, developed by <a href="http://www.phusion.nl/about.html">Phusion</a>, is the new kid entering the Rails deployment market.  We have been using the Apache <span class="caps">PHP </span>module for years and deploying a <span class="caps">PHP </span>applications is a snap.  This has not been possible with Rails until Passenger.  It is so easy too!  You can still use <a href="http://capify.org/">Capistrano</a> to automate deployment.  I will show you how I get it to work on Ubuntu.</p>



<pre lanb="bash">
sudo gem install passenger
passenger-install-apache2-module
</pre>



<p><b>Update:</b> Phusion just released <a href="http://phusion-passenger.googlecode.com/files/passenger-1.9.0.gem">Passenger 2.0 RC 1</a>.  You can download this version and do <code>gem install passenger-1.9.0.gem</code> instead.  But I had an error compiling it on Mac OS X Leopard.  hongli pointed me to use the version from <a href="http://github.com/FooBarWidget/passenger/tree/master">GitHub</a> that has the fix and it works like a charm.  Thanks Phusion guys.</p>

<p>To get it from GitHub:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">git clone git:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>FooBarWidget<span style="color: #000000; font-weight: bold;">/</span>passenger.git</pre></div></div>




<p>I create a separate <code>/etc/apache2/mods-available/passenger.load</code> and it contains the following:</p>

<p>For 1.0.5:</p>


<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">LoadModule</span> passenger_module /usr/local/lib/ruby/gems/<span style="color: #ff0000;">1.8</span>/gems/passenger-1.0.5/ext/apache2/mod_passenger.so
RailsSpawnServer /usr/local/lib/ruby/gems/<span style="color: #ff0000;">1.8</span>/gems/passenger-1.0.5/bin/passenger-spawn-server
RailsRuby /usr/local/bin/ruby</pre></div></div>




<p>For the GitHub version (Of course the path will look different depending on where your git clone is):</p>


<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">LoadModule</span> passenger_module /home/rlaw/downloads/passenger/ext/apache2/mod_passenger.so
PassengerRoot /home/rlaw/downloads/passenger
PassengerRuby /usr/local/bin/ruby</pre></div></div>




<p>I then tell Apache to load the Passenger module:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">a2enmod passenger</pre></div></div>




<p>Now, I create a virtual host configuration for one of my Rails app in <code>/etc/apache2/sites-available/dealistic</code>:</p>


<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> *:<span style="color: #ff0000;">80</span>&gt;
  <span style="color: #00007f;">ServerAdmin</span> webmaster@dealistic.com
  <span style="color: #00007f;">ServerName</span> dealistic.com
&nbsp;
  <span style="color: #00007f;">DocumentRoot</span> /home/deploy/apps/dealistic/current/public
&nbsp;
  &lt;<span style="color: #000000; font-weight:bold;">Directory</span> /home/deploy/apps/dealistic/current/public&gt;
    <span style="color: #00007f;">Options</span> <span style="color: #0000ff;">FollowSymLinks</span>
    <span style="color: #00007f;">AllowOverride</span> <span style="color: #0000ff;">None</span>
    <span style="color: #00007f;">Order</span> <span style="color: #00007f;">allow</span>,<span style="color: #00007f;">deny</span>
    <span style="color: #00007f;">Allow</span> <span style="color: #00007f;">from</span> <span style="color: #00007f;">all</span>
  &lt;/<span style="color: #000000; font-weight:bold;">Directory</span>&gt;
&nbsp;
  <span style="color: #00007f;">LogLevel</span> warn
  <span style="color: #00007f;">ErrorLog</span> /var/log/apache2/dealistic/error.log
  <span style="color: #00007f;">CustomLog</span> /var/log/apache2/dealistic/access.log combined
&lt;/<span style="color: #000000; font-weight:bold;">VirtualHost</span>&gt;</pre></div></div>




<p>I then restart Apache:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 reload</pre></div></div>




<p>When you need to restart your application because you have changed some code that Rails does not reload in production, just do:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>deploy<span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>dealistic<span style="color: #000000; font-weight: bold;">/</span>current<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>restart.txt</pre></div></div>




<p>I have not tried their <a href="http://www.rubyenterpriseedition.com/">Ruby Enterprise Edition</a> yet.  They claim substantial memory and speed improvement at <a href="http://en.oreilly.com/rails2008/public/schedule/detail/4354">RailsConf 2008</a>, so it will be interesting to see.</p><script src="http://feeds.feedburner.com/~s/rayvinly?i=http://rayvinly.com/articles/2008/06/11/deploying-your-rails-applications-with-phusion-passenger/" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://rayvinly.com/articles/2008/06/11/deploying-your-rails-applications-with-phusion-passenger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back from RailsConf 2008</title>
		<link>http://rayvinly.com/articles/2008/06/04/back-from-railsconf-2008/</link>
		<comments>http://rayvinly.com/articles/2008/06/04/back-from-railsconf-2008/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 11:32:49 +0000</pubDate>
		<dc:creator>Raymond Law</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[railsconf]]></category>
		<category><![CDATA[railsconf2008]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Photos posted to my flickr.]]></description>
			<content:encoded><![CDATA[<p>Photos posted to my <a href="http://flickr.com/photos/rayvinly/sets/72157605409054629/">flickr</a>.</p><script src="http://feeds.feedburner.com/~s/rayvinly?i=http://rayvinly.com/articles/2008/06/04/back-from-railsconf-2008/" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://rayvinly.com/articles/2008/06/04/back-from-railsconf-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
