<?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>Adam DiCarlo&#039;s Blog &#187; gem</title>
	<atom:link href="http://adamdicarlo.com/tag/gem/feed/" rel="self" type="application/rss+xml" />
	<link>http://adamdicarlo.com</link>
	<description>Programming, Linux, music, woodworking....</description>
	<lastBuildDate>Thu, 12 Nov 2009 21:26:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>gem won&#8217;t install Ruby gems on VPS&#8230;</title>
		<link>http://adamdicarlo.com/2009/07/28/gem-wont-install-ruby-gems-on-vps/</link>
		<comments>http://adamdicarlo.com/2009/07/28/gem-wont-install-ruby-gems-on-vps/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 07:47:21 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[System administration]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://adamdicarlo.com/?p=119</guid>
		<description><![CDATA[Having trouble installing Ruby gems on your VPS? Gem was hanging on my Slicehost slice (running Ubuntu Hardy with 256MB of RAM) at &#8220;Bulk updating [...]&#8220;:
$ gem update
Updating installed gems...
Bulk updating Gem source index for: http://gems.rubyforge.org
It was also gobbling up CPU and memory.
Why does gem hang?
The distro package for Gem is very old, and this [...]]]></description>
			<content:encoded><![CDATA[<p>Having trouble installing Ruby gems on your VPS? Gem was hanging on my Slicehost slice (running Ubuntu Hardy with 256MB of RAM) at &#8220;Bulk updating [...]&#8220;:</p>
<div class="codecolorer-container text " style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:475px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ gem update<br />
Updating installed gems...<br />
Bulk updating Gem source index for: http://gems.rubyforge.org</div></div>
<p>It was also gobbling up CPU and memory.</p>
<h3>Why does gem hang?</h3>
<p>The distro package for Gem is very old, and this old version uses a lot of memory, causing lots of disk thrashing. Since hard disks are, ahem, a bit slower than RAM, this increases gem&#8217;s run time by probably a few orders of magnitude.</p>
<h3>Solution</h3>
<p>Update gem manually:</p>
<div class="codecolorer-container bash " style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:475px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>rubyforge.org<span style="color: #000000; font-weight: bold;">/</span>frs<span style="color: #000000; font-weight: bold;">/</span>download.php<span style="color: #000000; font-weight: bold;">/</span>57642<span style="color: #000000; font-weight: bold;">/</span>rubygems-update-1.3.4.gem<br />
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> rubygems-update-1.3.4.gem<br />
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.8</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>update_rubygems<br />
Installing RubyGems 1.3.4<br />
Installing RubyGems<br />
Installing gem executable<br />
Removing old source_cache files<br />
Removing old RubyGems RDoc and ri<br />
Installing rubygems-1.3.4 ri into <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.8</span><span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>rubygems-1.3.4<span style="color: #000000; font-weight: bold;">/</span>ri<br />
Installing rubygems-1.3.4 rdoc into <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.8</span><span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>rubygems-1.3.4<span style="color: #000000; font-weight: bold;">/</span>rdoc<br />
<br />
RubyGems installed the following executables:<br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gem1.8</div></div>
<p>Looks like everything&#8217;s OK, but gem didn&#8217;t work anymore:</p>
<div class="codecolorer-container bash " style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:475px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> haml<br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gem:<span style="color: #000000;">10</span>: undefined method <span style="color: #000000; font-weight: bold;">`</span>manage_gems<span style="color: #ff0000;">' for Gem:Module (NoMethodError)</span></div></div>
<p>What gives? Notice the path, /usr/bin/gem. Is that still the old version?</p>
<div class="codecolorer-container bash " style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:475px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-lah</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gem<span style="color: #000000; font-weight: bold;">*</span><br />
<span style="color: #660033;">-rwxr-xr-x</span> 1 root root 701 Nov 19 &nbsp;2007 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gem<br />
<span style="color: #660033;">-rwxr-xr-x</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">545</span> Jul <span style="color: #000000;">28</span> 00:<span style="color: #000000;">15</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gem1.8</div></div>
<p>Yes. This is what we get for upgrading gem without using Ubuntu&#8217;s package system. Well, in for a penny, in for a pound:</p>
<div class="codecolorer-container bash " style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:475px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gem1.8 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gem</div></div>
<p>Done. Now to install Haml and Sass&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://adamdicarlo.com/2009/07/28/gem-wont-install-ruby-gems-on-vps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
