<?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"
	>

<channel>
	<title>Todd Pinkerton &#187; rails</title>
	<atom:link href="http://www.toddpinkerton.com/blog/category/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.toddpinkerton.com/blog</link>
	<description>have you tried turning it off and on again?</description>
	<pubDate>Fri, 15 Aug 2008 03:07:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>how to scale your web app</title>
		<link>http://www.toddpinkerton.com/blog/2007/04/29/how-to-scale-your-web-app/</link>
		<comments>http://www.toddpinkerton.com/blog/2007/04/29/how-to-scale-your-web-app/#comments</comments>
		<pubDate>Mon, 30 Apr 2007 03:46:57 +0000</pubDate>
		<dc:creator>todd</dc:creator>
		
	<dc:subject>rails</dc:subject>
	<dc:subject>scalability</dc:subject>
	<!-- AutoMeta Start -->
	<category>3dogsbark</category>
	<category>slideshow</category>
	<category>presented</category>
	<category>george</category>
	<category>level</category>
	<category>palmer</category>
	<category>scaling</category>
	<category>webapp</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.toddpinkerton.com/blog/2007/04/29/how-to-scale-your-web-app/</guid>
		<description><![CDATA[George Palmer (3dogsbark.com) presented a great overview at Barcamp London on scaling a rails webapp.  The slideshow is available here.  I wasn&#8217;t there when he presented this, but the slides themselves are impressive &#8212; lots of pictures and you can follow along easily, even without any narration.  He covers moving from one [...]]]></description>
			<content:encoded><![CDATA[<p><a title="George Palmer -- 3dogsbark.com" href="http://3dogsbark.com">George Palmer</a> (3dogsbark.com) presented a great overview at Barcamp London on scaling a rails webapp.  <a title="scaling a rails webapp" href="http://www.slideshare.net/Georgio_1999/how-to-scale-your-web-app">The slideshow is available here</a>.  I wasn&#8217;t there when he presented this, but the slides themselves are impressive &#8212; lots of pictures and you can follow along easily, even without any narration.  He covers moving from one server to two, scaling the database, clustering, caching, and even a design for globally-distributed sites under heavy load.</p>
<p>Most startup-scale web apps don&#8217;t have traffic requiring this level of infrastructure, but it&#8217;s nice to have a plan in place to get to the next level when the need arises.  This slideshow can help lay the groundwork for such a plan, and maybe even help you (and your team) sleep better knowing you have a way to manage growth.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.toddpinkerton.com/blog/2007/04/29/how-to-scale-your-web-app/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ruby, gcc, and powerPC macs</title>
		<link>http://www.toddpinkerton.com/blog/2007/04/06/ruby-gcc-and-powerpc-macs/</link>
		<comments>http://www.toddpinkerton.com/blog/2007/04/06/ruby-gcc-and-powerpc-macs/#comments</comments>
		<pubDate>Sat, 07 Apr 2007 02:48:04 +0000</pubDate>
		<dc:creator>todd</dc:creator>
		
	<dc:subject>Uncategorized</dc:subject>
	<dc:subject>mac</dc:subject>
	<dc:subject>rails</dc:subject>
	<dc:subject>tech</dc:subject>
	<!-- AutoMeta Start -->
	<category>rails</category>
	<category>gems</category>
	<category>fixnum</category>
	<category>mac</category>
	<category>readline</category>
	<category>powerpc</category>
	<category>turns</category>
	<category>ruby</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.toddpinkerton.com/blog/2007/04/06/ruby-gcc-and-powerpc-macs/</guid>
		<description><![CDATA[I&#8217;ve been having trouble with my rails installation for a while. Tests would fail but only every so often, and occasionally a Fixnum object would show up when something else was expected, crashing my app.
It turns out, ruby compiled wth gcc 4.0 on powerPC macs &#8212; which my laptop is one &#8212; is known to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been having trouble with my rails installation for a while. Tests would fail but only every so often, and occasionally a Fixnum object would show up when something else was expected, crashing my app.</p>
<p>It turns out, ruby compiled wth gcc 4.0 on powerPC macs &#8212; which my laptop is one &#8212; is known to exhibit these strange behaviors.  David Heinemeier Hansson <cite><span class="date" /></cite> himself mentioned this in <a href="http://www.vmunix.com/mark/blog/archives/2006/04/08/ruby-gems-still-doesnt-work-on-104/">this blog post</a>.</p>
<p>Turns out, the solution is to set gcc to 3.3 mode, rebuild ruby and any dependent libraries. You can do this with &#8216;gcc_select 3.3&#8242;, then running configure, make, make install as usual.</p>
<p>On the way to finding this fix, I tried updating to Ruby 1.8.5 patchlevel 2.  To get this to work, I had to configure, make, and install, then go into the source tarball in ext/readline and  run :</p>
<pre><span style="color: #007700">cd ext/readline</span></pre>
<pre>> <span style="color: #007700">ruby extconf.rb</span></pre>
<pre>> <span style="color: #007700">make</span> <span style="color: #007700" /></pre>
<pre><span style="color: #007700">> sudo cp readline.bundle /usr/local/lib/ruby/site_ruby/1.8/powerpc-</span><span style="color: #007700">darwin8.9.0</span><span style="color: #007700" /></pre>
<pre>Those instructions came from <a href="http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/5118">this mailing list archive.</a></pre>
<p>So if you&#8217;re running ruby patchlevel 2 &#8212; which is the latest ruby that works with rails 1.2.2 &#8212; make sure you compile with gcc 3.3, and copy over the readline bundle as described above.</p>
<p>I&#8217;m pretty disappointed this much hackery is required to get ruby working on my machine, which is a fairly standard platform.  Ruby should &#8220;just work&#8221; with gcc 4.0, and the Makefile should do the right thing with the readline module as well.  Grrr.<br />
In the near future I hope to get an Intel mac to develop on, and have access to all the latest ruby/rails goodies on that.  But at least now all my tests are passing, and I&#8217;m not getting any more strange Fixnum errors.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.toddpinkerton.com/blog/2007/04/06/ruby-gcc-and-powerpc-macs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Rails on Amazon&#8217;s elastic computing cloud</title>
		<link>http://www.toddpinkerton.com/blog/2006/11/14/rails-on-amazons-elastic-computing-cloud/</link>
		<comments>http://www.toddpinkerton.com/blog/2006/11/14/rails-on-amazons-elastic-computing-cloud/#comments</comments>
		<pubDate>Tue, 14 Nov 2006 22:09:16 +0000</pubDate>
		<dc:creator>todd</dc:creator>
		
	<dc:subject>rails</dc:subject>
	<dc:subject>scalability</dc:subject>
	<!-- AutoMeta Start -->
	<category>amazon</category>
	<category>instance</category>
	<category>image</category>
	<category>storage</category>
	<category>amazon</category>
	<category>share</category>
	<category>idea</category>
	<category>quickly</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.toddpinkerton.com/blog/?p=12</guid>
		<description><![CDATA[amazon has recently announced their Elastic Computing Cloud service.  It gives users the ability to quickly create a virtual machine in amazon&#8217;s datacenter, install whatever OS they want, and use it for whatever &#8212; webserver, cracking crypto, etc.    The idea is to make scaling your application easy as demand increases.  [...]]]></description>
			<content:encoded><![CDATA[<p>amazon has recently announced their <a href="http://www.amazon.com/b/ref=sc_fe_l_2/102-2663531-8287340?ie=UTF8&#038;node=201590011&#038;no=3435361&#038;me=A36L942TSJ2AJA">Elastic Computing Cloud</a> service.  It gives users the ability to quickly create a virtual machine in amazon&#8217;s datacenter, install whatever OS they want, and use it for whatever &#8212; webserver, cracking crypto, etc.    The idea is to make scaling your application easy as demand increases.  Instead of buying/installing/maintaining additional servers, you can just pay for a few hours of EC2 time. For now, the EC2 service is in beta, and invite-only.<br />
You can bring up many identical machines quickly, using an AMI image you create.The catch is that you must persist all your data before taking down your virtual instance &#8212; the filesystem it provides gets destroyed whenever you reboot or stop running the instance, so you need to save your data off to the S3 storage service.    There is some up-front work to be done once you get an account and begin using the EC2, however. Amazon provides a small selection of basic disk images, but to do anything useful you&#8217;ll need to install your own software.  I wanted to try running Ruby on Rails in this environment, so I create an AMI with all the software I needed and saved it to the S3 storage.  Now whenever I need a new RoR machine, I run a single command to tell EC2 to create a new instance of that AMI, and in a few minutes it&#8217;s ready.</p>
<p>I followed the instructions <a href="http://woss.name/2006/09/19/setting-up-an-amazon-ec2-server-with-fedora-core-5/">here </a>for upgrading the default image to Fedora Core 5, and then <a href="http://www.befittr.com/blog/2006/09/09/configuring-ec2-rails-mongrel-apache-22-and-mysql-5/">these instructions</a> to install ruby, rails, and mongrel, for a complete RoR setup.<br />
I&#8217;m trying to figure out how to share this AMI with others, so they can use it without going through all the bother that I did setting it up.  The obvious thing is to download the image from S3, create a torrent, and share that.  But ideally we&#8217;d be able to allow others to access our S3 storage, since that&#8217;s where users would have to upload the image to anyway.  If anyone has an idea on how to do this, let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.toddpinkerton.com/blog/2006/11/14/rails-on-amazons-elastic-computing-cloud/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
