<?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>All Geekness Great and Small &#187; ruby</title>
	<atom:link href="http://www.danrumney.co.uk/tag/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.danrumney.co.uk</link>
	<description>Technology from work and home</description>
	<lastBuildDate>Mon, 06 Sep 2010 03:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>RubyGems fun with a VPS server</title>
		<link>http://www.danrumney.co.uk/2009/10/07/rubygems-fun-with-a-vps-server/</link>
		<comments>http://www.danrumney.co.uk/2009/10/07/rubygems-fun-with-a-vps-server/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 00:01:20 +0000</pubDate>
		<dc:creator>dancrumb</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubygems]]></category>

		<guid isPermaLink="false">http://www.danrumney.co.uk/?p=264</guid>
		<description><![CDATA[All of my websites are currently running on a VPS server provided by HostIcan. I recently discovered a little quirk involving VPS servers and RubyGems. I&#8217;ve started learning Ruby on Rails and the Ruby part uses things called &#8216;Gems&#8217; in a similar way to Perl using Modules. Where you read &#8216;gem&#8217;, thing &#8216;cpan&#8217;. I wanted [...]]]></description>
			<content:encoded><![CDATA[<p>All of my websites are currently running on a VPS server provided by HostIcan. I recently discovered a little quirk involving VPS servers and RubyGems.</p>
<p>I&#8217;ve started learning Ruby on Rails and the Ruby part uses things called &#8216;Gems&#8217; in a similar way to Perl using Modules. Where you read &#8216;gem&#8217;, thing &#8216;cpan&#8217;.</p>
<p>I wanted to install a new gem on my server to support some Paypal integration, but &#8216;gem&#8217; kept segfaulting on me.</p>
<p>If you&#8217;re like me, you&#8217;ll see this behaviour:</p>
<pre>root@server [~]# gem install rubygems-update
Bulk updating Gem source index for: http://gems.rubyforge.org
Terminated</pre>
<p>It turns out that &#8216;Bulk updating&#8230;&#8217; part gobbles up memory like it&#8217;s going spare and leads to a segfault.</p>
<p>The way to avoid this problem is to update RubyGems&#8230; but to do that, you need to use &#8216;gem&#8217;&#8230; and that leads to a segfault&#8230; and around we go again.</p>
<p>To break the cycle, you simply use:</p>
<pre>gem update --system --no-update-sources</pre>
<p>to prevent the updating of sources.</p>
<p>Once I&#8217;d done that, I found that I was <strong>still</strong> getting segmentation faults. Also, when I ran:</p>
<pre>root@server [~]# gem install activemerchant --no-update-sources</pre>
<p>I now got</p>
<pre>ERROR:  could not find activemerchant locally or in a repository</pre>
<p>So the problem still wasn&#8217;t resolved!</p>
<p>The only solution was to force my system to the latest version of RubyGems. Unfortunately, this was not in my local repository. However, a manual update was pretty simple:</p>
<pre>cd /tmp
wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
tar -xvzf rubygems-1.3.5.tgz
cd rubygems-1.3
ruby setup.rb</pre>
<p>Job done!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danrumney.co.uk/2009/10/07/rubygems-fun-with-a-vps-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
