<?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>42</title>
	<atom:link href="http://www.42.mach7x.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.42.mach7x.com</link>
	<description>Thoughts and tips about programming with Ruby on Rails</description>
	<lastBuildDate>Fri, 06 Aug 2010 11:57:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>God gem problem unpacking with Rails 2.3.2</title>
		<link>http://www.42.mach7x.com/2010/08/06/god-gem-problem-unpacking-with-rails-2-3-2/</link>
		<comments>http://www.42.mach7x.com/2010/08/06/god-gem-problem-unpacking-with-rails-2-3-2/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 11:14:16 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[God gem]]></category>
		<category><![CDATA[Rails 2.3.2]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=212</guid>
		<description><![CDATA[Problem When using the god gem in a Rails 2.3.2 application, when you unpack (freeze) the god gem with : sudo rake gems:unpack it creates the god drectory in vendor/gems with root owner, and group permissions. Solution Remember to change owner and group for the folder sudo chown -R user_name vendor/gems/god-0.11.0 sudo chown -R user_name [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
When using the god gem in a Rails 2.3.2 application, when you unpack (freeze) the god gem with :</p>
<p><span class="code">sudo rake gems:unpack</span></p>
<p>it creates the god drectory in vendor/gems with root owner, and group permissions.</p>
<p><strong>Solution</strong><br />
Remember to change owner and group for the folder</p>
<p><span class="code">sudo chown -R user_name vendor/gems/god-0.11.0<br />
sudo chown -R user_name vendor/gems/god-0.11.0</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/08/06/god-gem-problem-unpacking-with-rails-2-3-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dreamhost &#8211; SquirrelMail &#8211; old-messages folder</title>
		<link>http://www.42.mach7x.com/2010/08/05/dreamhost-squirrelmail-old-messages-folder/</link>
		<comments>http://www.42.mach7x.com/2010/08/05/dreamhost-squirrelmail-old-messages-folder/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 17:14:50 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[old-messages]]></category>
		<category><![CDATA[squirrelmail]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=210</guid>
		<description><![CDATA[Problem You have left a message in a squirrel mail account in dreamhost for a long time and it gets archived by dreamhost. According to the dreamhost you should be able to get to your archived messages, by looking at the old-messages folder. The problem is that just by logging in to squirrel mail the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
You have left a message in a squirrel mail account in dreamhost for a long time and it gets archived by dreamhost. According to the dreamhost you should be able to get to your archived messages, by looking at the old-messages folder.<br />
The problem is that just by logging in to squirrel mail the folder doesn&#8217;t get displayed on the left hand side.</p>
<p><strong>Solution</strong><br />
Log on to squirrel mail and go to &#8216;Folders&#8217; menu at the top.<br />
In the &#8216;Create Folder&#8217; put &#8216;test&#8217; or anything that you would like in the text box, and make sure that in the dropdown box you select &#8216;INBOX.old-messages&#8217;, so your newly created folder is a subfolder of the &#8216;inbox/old-messages&#8217; folder.<br />
Create the subfolder, refresh the page, and in your left hand the old-messages folder should appear.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/08/05/dreamhost-squirrelmail-old-messages-folder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thunderbird &#8211; GoogleMail</title>
		<link>http://www.42.mach7x.com/2010/07/21/thunderbird-googlemail/</link>
		<comments>http://www.42.mach7x.com/2010/07/21/thunderbird-googlemail/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 08:27:50 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Thunderbird]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=207</guid>
		<description><![CDATA[Problem You want to add the Google calendar tab in your thunderbird but you don&#8217;t want to use the standard google mail calendar, but the one setup for your domain. Solution Install the Google Calendar add on in Thunderbird: Tools -> Addons -> Get Add-ons and then search for Calendar (Google Calendar Tab) The when [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
You want to add the Google calendar tab in your thunderbird but you don&#8217;t want to use the standard google mail calendar, but the one setup for your domain.</p>
<p><strong>Solution</strong><br />
Install the Google Calendar add on in Thunderbird:</p>
<p>Tools -> Addons -> Get Add-ons and then search for Calendar (Google Calendar Tab)</p>
<p>The when thunderbird is restarted go and change the default domain for logging in to the calender in:</p>
<p>Tools &#8211; Add-ons -> Extensions</p>
<p>and select the Preferences in the Google Calendar Tab.</p>
<p>from there select the &#8216;Google Apps for your domain&#8217; and then change the URL into something like:</p>
<p>&#8216;http://www.google.com/calendar/hosted/your_domain_hosted_with_google</p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/07/21/thunderbird-googlemail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Syncing files between PCs with rsync and ssh</title>
		<link>http://www.42.mach7x.com/2010/07/15/syncing-files-between-pcs-with-rsync-and-ssh/</link>
		<comments>http://www.42.mach7x.com/2010/07/15/syncing-files-between-pcs-with-rsync-and-ssh/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 12:30:38 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=205</guid>
		<description><![CDATA[Problem You want to mirror directories from one PC to another, using rsync and ssh. Solution Use the following: rsync -avc /path/to/source_folder/ user_name@remote_pc:/path/to/destination_folder/]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
You want to mirror directories from one PC to another, using rsync and ssh.</p>
<p><strong>Solution</strong><br />
Use the following:<br />
<span class="code">rsync -avc /path/to/source_folder/ user_name@remote_pc:/path/to/destination_folder/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/07/15/syncing-files-between-pcs-with-rsync-and-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Help! I&#8217;m getting the message &#8220;libMagickWand.so.1: cannot open shared object file: No such file or directory&#8221; I know ImageMagick is installed! What should I do?</title>
		<link>http://www.42.mach7x.com/2010/07/13/help-im-getting-the-message-libmagickwand-so-1-cannot-open-shared-object-file-no-such-file-or-directory-i-know-imagemagick-is-installed-what-should-i-do/</link>
		<comments>http://www.42.mach7x.com/2010/07/13/help-im-getting-the-message-libmagickwand-so-1-cannot-open-shared-object-file-no-such-file-or-directory-i-know-imagemagick-is-installed-what-should-i-do/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 16:20:01 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[LD_LIBRARY_PATH]]></category>
		<category><![CDATA[Rmagick]]></category>
		<category><![CDATA[shared libraries]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=203</guid>
		<description><![CDATA[Problem Cannot install RMagick as there is an error about nob being able to find some shared libraries. Solution After reading the RMagick installation FAQ it seem there is a problem with the LD_LIBRARY_PATH that cannot find the needed libraries as they are installed in /usr/local/lib instead of /usr/lib. Doing a quick search revealed that [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
Cannot install RMagick as there is an error about nob being able to find some shared libraries.</p>
<p><strong>Solution</strong><br />
After reading the RMagick installation FAQ it seem there is a problem with the LD_LIBRARY_PATH that cannot find the needed libraries as they are installed in /usr/local/lib instead of /usr/lib.<br />
Doing a quick search revealed that people suggest that the LD_LIBRARY_PATH shouldn&#8217;t be changed, for various reasons.<br />
So, the quick solution is to create a couple of symbolic links for the libraries that cannot be found, ie:</p>
<p><span class="code">sudo ln -s /usr/local/lib/libMagickWand.so.4 /usr/lib/libMagickWand.so.4<br />
ln -s /usr/local/lib/libMagickCore.so.4 /usr/lib/libMagickCore.so.4</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/07/13/help-im-getting-the-message-libmagickwand-so-1-cannot-open-shared-object-file-no-such-file-or-directory-i-know-imagemagick-is-installed-what-should-i-do/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails find case sensitive search</title>
		<link>http://www.42.mach7x.com/2010/05/17/rails-find-case-sensitive-search/</link>
		<comments>http://www.42.mach7x.com/2010/05/17/rails-find-case-sensitive-search/#comments</comments>
		<pubDate>Mon, 17 May 2010 16:14:48 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[BINARY]]></category>
		<category><![CDATA[Case insensitive]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=200</guid>
		<description><![CDATA[Problem You want to use find in Rails for a case sensitive search. For example in your authentication logic you have something to find the user to login as in: u=User.find_by_login(&#8216;username&#8217;) If you don&#8217;t want to limit the available logins with case insensitive validation in the model, then the above code will not work if [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
You want to use find in Rails for a case sensitive search. For example in your authentication logic you have something to find the user to login as in:<br />
<span class="code">u=User.find_by_login(&#8216;username&#8217;)</span><br />
If you don&#8217;t want to limit the available logins with case insensitive validation in the model, then the above code will not work if you have &#8216;Username&#8217; and &#8216;username&#8217; as available logins, as the find will only return one of them.</p>
<p><strong>Solution</strong><br />
Change the find method to use the BINARY keyword in your database (only used with MySQL), as in the following:<br />
<span class="code">u=User.find(:first, :conditions => ["BINARY login = ?", login])</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/05/17/rails-find-case-sensitive-search/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ATI Radeon HD-4350 Mandriva 2010 Dual Monitor</title>
		<link>http://www.42.mach7x.com/2010/05/14/ati-radeon-hd-43500-mandriva-201-dual-monitor/</link>
		<comments>http://www.42.mach7x.com/2010/05/14/ati-radeon-hd-43500-mandriva-201-dual-monitor/#comments</comments>
		<pubDate>Fri, 14 May 2010 10:47:29 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[Mandriva]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Dual Monitor]]></category>
		<category><![CDATA[mandriva 2010]]></category>
		<category><![CDATA[Xorg]]></category>
		<category><![CDATA[xranr]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=198</guid>
		<description><![CDATA[Problem Trying to get Mandriva 2010 to work on a dual monitor with an ATI Radeon HD 4350. Desktop used is a Dell Vostro 430 and two BenQ G920WL monitors. Solution After reading the articles here and here, the steps required were: Select driver ATI Radeon HD 2000 and later (radeon/fglrx) Don&#8217;t select proprietary driver [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
Trying to get Mandriva 2010 to work on a dual monitor with an ATI Radeon HD 4350. Desktop used is a Dell Vostro 430 and two BenQ G920WL monitors.</p>
<p><strong>Solution</strong><br />
After reading the articles <a href="http://forum.mandriva.com/viewtopic.php?t=110181">here</a> and <a href="http://www.thinkwiki.org/wiki/Xorg_RandR_1.2">here</a>, the steps required were:</p>
<ul>
<li>Select driver ATI Radeon HD 2000 and later (radeon/fglrx)</li>
<li>Don&#8217;t select proprietary driver from next screen</li>
<li>Run xrandr -q to find out the name of the monitors</li>
<li>From the output find out the current resolution (1440&#215;900), names (VGA_1,DVI-I_2/analog) and maximum resolution (1440&#215;900)</li>
<li>Edit the xorg.conf file (/etc/X11/xorg.conf) and add the Virtual 2880 900 (without quotes) underneath the Modes line in the Display Subsection</li>
<li>Save the file and restart the X server</li>
<li>Run again the xrandr -q command and make sure the maximum resolution has changed to 2880&#215;900</li>
<li>Run xrandr &#8211;output DVI-I_2/analog &#8211;auto &#8211;right-of VGA_1 to put one screen next to the other
<li>
<li>Follow the description <a href="http://www.thinkwiki.org/wiki/Xorg_RandR_1.2">here</a> to set it up permanently on login</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/05/14/ati-radeon-hd-43500-mandriva-201-dual-monitor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Problem with Sansa mp3 player automatic connection in Mandriva</title>
		<link>http://www.42.mach7x.com/2010/04/28/problem-with-sansa-mp3-player-automatic-connection-in-mandriva/</link>
		<comments>http://www.42.mach7x.com/2010/04/28/problem-with-sansa-mp3-player-automatic-connection-in-mandriva/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 23:12:17 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[Mandriva]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Sansa]]></category>
		<category><![CDATA[USB]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=196</guid>
		<description><![CDATA[Problem After an upgrade my Sansa E260 is no longer automatically recognised in Mandriva and looking at the /var/log/messages displays the error: reset high speed USB device using ehci_hcd and address 5 Solution Run as su the following (maybe a couple of times), while the sansa is connected: sudo rmmod ehci_hcd sudo modprobe ehci_hcd]]></description>
			<content:encoded><![CDATA[<p><Strong>Problem</strong><br />
After an upgrade my Sansa E260 is no longer automatically recognised in Mandriva and looking at the /var/log/messages displays the error:<br />
<span class="code">reset high speed USB device using ehci_hcd and address 5</span></p>
<p><Strong>Solution</strong><br />
Run as su the following (maybe a couple of times), while the sansa is connected:<br />
<span class="code">sudo rmmod ehci_hcd<br />
sudo modprobe ehci_hcd</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/04/28/problem-with-sansa-mp3-player-automatic-connection-in-mandriva/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>406 Not Acceptable &#8211; Princely &#8211; Dreamhost</title>
		<link>http://www.42.mach7x.com/2010/04/22/406-not-acceptable-princely-dreamhost/</link>
		<comments>http://www.42.mach7x.com/2010/04/22/406-not-acceptable-princely-dreamhost/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 10:14:42 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[Prince XML]]></category>
		<category><![CDATA[princely]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=193</guid>
		<description><![CDATA[Problem You get a &#8217;406 Not Acceptable&#8217; response from the web server when you try to use the princely plugin for generating pdf on a Ruby on Rails application hosted on dreamhost. Solution Having tried the &#8216;Extra Web Security&#8217; settings in dreamhost Web panel, and setting them on/off did not get very far. Also setting [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
You get a &#8217;406 Not Acceptable&#8217;  response from the web server when you try to use the princely plugin for generating pdf on a Ruby on Rails application hosted on dreamhost.</p>
<p><strong>Solution</strong><br />
Having tried the &#8216;Extra Web Security&#8217; settings in dreamhost Web panel, and setting them on/off did not get very far.<br />
Also setting up an .htaccess file didn&#8217;t seem to make any difference.<br />
So the mod_security settings did not seem to be the cause of the problem.<br />
Having a look at the apache error log files which in the case of the dreamhost ps are in /usr/local/dh/apache2/logs/apache2-ps_name it turns out that the problem was that the path for the prince binary was not setting up correctly in the file vendor/plugins/princely/lib/prince.rb on line 26.<br />
A quick hack to make it work until finding the reason for the problem is to hardcode the path to the prince binary, so:<br />
<span class="code">@exe_path = `which prince`.chomp<br />
if @exe_path.nil?<br />
  @exe_path=&#8217;/usr/local/bin/prince&#8217;<br />
end</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/04/22/406-not-acceptable-princely-dreamhost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing MySQL GUI tools (mysql-query-browser, mysql-administrator) in Mandriva 2010</title>
		<link>http://www.42.mach7x.com/2010/04/14/installing-mysql-gui-tools-mysql-query-browser-mysql-administrator-in-mandriva-2010/</link>
		<comments>http://www.42.mach7x.com/2010/04/14/installing-mysql-gui-tools-mysql-query-browser-mysql-administrator-in-mandriva-2010/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 10:46:00 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[Mandriva]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Administrator]]></category>
		<category><![CDATA[Query Browser]]></category>
		<category><![CDATA[RPM]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=191</guid>
		<description><![CDATA[Problem You want to install the GUI tools for MySQL in Mandriva 2010 but a quick search in the MySQL website doesn&#8217;t list the Mandriva rpm files. Solution To install the tools in Mandriva 2010 run: sudo urpmi mysql-query-browser mysql-administrator.]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
You want to install the GUI tools for MySQL in Mandriva 2010 but a quick search in the MySQL website doesn&#8217;t list the Mandriva rpm files.</p>
<p><strong>Solution</strong><br />
To install the tools in Mandriva 2010 run:<br />
<span class="code">sudo urpmi mysql-query-browser mysql-administrator</span>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/04/14/installing-mysql-gui-tools-mysql-query-browser-mysql-administrator-in-mandriva-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
