<?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; System administration</title>
	<atom:link href="http://adamdicarlo.com/category/system-administration/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>Installing the PEAR/PECL uploadprogress extension for Drupal 7</title>
		<link>http://adamdicarlo.com/2009/09/16/installing-the-pearpecl-uploadprogress-extension-for-drupal-7/</link>
		<comments>http://adamdicarlo.com/2009/09/16/installing-the-pearpecl-uploadprogress-extension-for-drupal-7/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 06:43:06 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[System administration]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[pear]]></category>

		<guid isPermaLink="false">http://adamdicarlo.com/?p=152</guid>
		<description><![CDATA[Trying out the latest development snapshot of Drupal 7, I noticed it supports the uploadprogress PEAR/PECL extension, which apparently lets you see the actual progress (with some kind of Ajaxy widget) while uploading files. Sounds cool to me.
First, I installed PEAR (on my Ubuntu testing server):
$ sudo aptitude install php-pear
and then tried to use PEAR [...]]]></description>
			<content:encoded><![CDATA[<p>Trying out the latest development snapshot of Drupal 7, I noticed it supports the <a href="http://pecl.php.net/package/uploadprogress">uploadprogress</a> PEAR/PECL extension, which apparently lets you see the actual progress (with some kind of Ajaxy widget) while uploading files. Sounds cool to me.</p>
<p>First, I installed <a href="http://pear.php.net/">PEAR</a> (on my Ubuntu testing server):</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">$ sudo aptitude install php-pear</div></div>
<p>and then tried to use PEAR to install uploadprogress:</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">$ sudo pear install pecl/uploadprogress<br />
downloading uploadprogress-1.0.1.tgz ...<br />
Starting to download uploadprogress-1.0.1.tgz (8,536 bytes)<br />
.....done: 8,536 bytes<br />
4 source files, building<br />
running: phpize<br />
sh: phpize: not found<br />
ERROR: `phpize' failed</div></div>
<p>PHPize? What&#8217;s that? There&#8217;s no phpize package; <strong>aptitude search phpize</strong> gives nothing.</p>
<p>A bit of digging and I found that PHPize is part of the <strong>php5-dev</strong> package! After installing that, pecl can install a module just fine:</p>
<h3>Solution</h3>
<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">$ sudo apt-get install php5-dev<br />
$ sudo pear install pecl/uploadprogress</div></div>
<p>After lots of output, PEAR left a final clue:</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">configuration option &quot;php_ini&quot; is not set to php.ini location<br />
You should add &quot;extension=uploadprogress.so&quot; to php.ini</div></div>
<p>So I created /etc/php/conf.d/uploadprogress.ini, containing just this line:</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">extension=uploadprogress.so</div></div>
<p>I restarted Apache and now Drupal 7 reports &#8220;UPLOAD PROGRESS: Enabled&#8221;. Now to try it out&#8230;.!</p>
]]></content:encoded>
			<wfw:commentRss>http://adamdicarlo.com/2009/09/16/installing-the-pearpecl-uploadprogress-extension-for-drupal-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing the mysql Ruby gem</title>
		<link>http://adamdicarlo.com/2009/08/01/installing-the-mysql-ruby-gem/</link>
		<comments>http://adamdicarlo.com/2009/08/01/installing-the-mysql-ruby-gem/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 20:18:22 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[System administration]]></category>

		<guid isPermaLink="false">http://adamdicarlo.com/?p=132</guid>
		<description><![CDATA[While trying to install this gem on Ubuntu 8.04.3 (Hardy) to run a rails app (Redmine), I encountered the following error:
$ sudo gem install mysql
Building native extensions. &#160;This could take a while...
ERROR: &#160;Error installing mysql:
&#160; &#160; &#160; &#160; ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>While trying to install this gem on Ubuntu 8.04.3 (Hardy) to run a rails app (<a href="http://redmine.org">Redmine</a>), I encountered the following error:</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">$ sudo gem install mysql<br />
Building native extensions. &nbsp;This could take a while...<br />
ERROR: &nbsp;Error installing mysql:<br />
&nbsp; &nbsp; &nbsp; &nbsp; ERROR: Failed to build gem native extension.<br />
<br />
/usr/bin/ruby1.8 extconf.rb<br />
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)<br />
&nbsp; &nbsp; &nbsp; &nbsp; from extconf.rb:1</div></div>
<p>There are a bunch of common errors when installing the mysql gem, so Googling for the solution wasn&#8217;t instant. Luckily I found <a href="http://www.searchmarked.com/ubuntu/how-to-get-past-the-require-no-such-file-to-load-mkmf-loaderror-when-installing-the-mysql-gem.php">this post</a> which showed the missing package: ruby1.8-dev.</p>
<h3>Solution</h3>
<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">sudo apt-get install ruby1.8-dev</div></div>
<p>and the MySQL gem installed fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://adamdicarlo.com/2009/08/01/installing-the-mysql-ruby-gem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>
