<?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 &#187; linux</title>
	<atom:link href="http://www.42.mach7x.com/tag/linux/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>Wed, 01 Feb 2012 14:38:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>passenger ArgumentError (invalid byte sequence in US-ASCII)</title>
		<link>http://www.42.mach7x.com/2011/09/12/passenger-argumenterror-invalid-byte-sequence-in-us-ascii/</link>
		<comments>http://www.42.mach7x.com/2011/09/12/passenger-argumenterror-invalid-byte-sequence-in-us-ascii/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 08:17:00 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[Phusion Passenger]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Passenger]]></category>
		<category><![CDATA[redmine]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=404</guid>
		<description><![CDATA[Problem After upgrading your server to use rvm and Ruby 1.9 you get the following error when you are trying to access certain parts of your redmine installation: passenger ArgumentError (invalid byte sequence in US-ASCII) Solution If you follow the instruction posted here, you can add the following to your redmine&#8217;s &#8220;RAILS_ROOT/config/initializers/string_encodings.rb&#8221;: Encoding.default_external = 'UTF-8' [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
After upgrading your server to use rvm and Ruby 1.9 you get the following error when you are trying to access certain parts of your redmine installation:</p>
<p><code>passenger ArgumentError (invalid byte sequence in US-ASCII)</code></p>
<p><strong>Solution</strong><br />
If you follow the instruction posted <a href="http://stackoverflow.com/questions/3597255/why-does-my-sproutcore-development-server-drop-connections-with-invalid-byte-seq/3598303#3598303" title="here">here</a>, you can add the following to your redmine&#8217;s &#8220;RAILS_ROOT/config/initializers/string_encodings.rb&#8221;:</p>
<p><code>Encoding.default_external = 'UTF-8'</code></p>
<p>and restart your application</p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2011/09/12/passenger-argumenterror-invalid-byte-sequence-in-us-ascii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OSx &#8211; VMware &#8211; Mandriva resizing partition</title>
		<link>http://www.42.mach7x.com/2011/07/08/osx-vmware-mandriva-resizing-partition/</link>
		<comments>http://www.42.mach7x.com/2011/07/08/osx-vmware-mandriva-resizing-partition/#comments</comments>
		<pubDate>Fri, 08 Jul 2011 15:20:41 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Mandriva]]></category>
		<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=359</guid>
		<description><![CDATA[Problem When you use WMware to run Mandriva or any other distribution on Mac OSx, if you resize the hard disk partition in VMware your Mandriva system won&#8217;t automatically resize the partition to use the newly available space. Solution To be able to use the available space the quickest solution is: restart your VMware session [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
When you use WMware to run Mandriva or any other distribution on Mac OSx, if you resize the hard disk partition in VMware your Mandriva system won&#8217;t automatically resize the partition to use the newly available space.</p>
<p><strong>Solution</strong><br />
To be able to use the available space the quickest solution is:</p>
<ul>
<li>restart your VMware session but run in safe mode</li>
<li>start up drakdisk</li>
<li>select the partition you want to resize. WARNING (Make sure you back up important data &#8211; even though in my case everything went smoothly)</li>
<li>umount the select partition and resize using all the avaliable free space</li>
<li>after a few minutes you should be able to restart your VMware and login to your virtual machine as normal, and the partition should be resized</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2011/07/08/osx-vmware-mandriva-resizing-partition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ldapsearch &#8211; OpenLDAP &#8211; Mandriva</title>
		<link>http://www.42.mach7x.com/2011/02/09/ldapsearch-openldap-mandriva/</link>
		<comments>http://www.42.mach7x.com/2011/02/09/ldapsearch-openldap-mandriva/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 13:01:46 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Mandriva]]></category>
		<category><![CDATA[OpenLDAP]]></category>
		<category><![CDATA[ldapsearch]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=302</guid>
		<description><![CDATA[Problem You need to install OpenLDAP for testing the authentication against LDAP, but the command line utility ldapsearch is not installed in your system. Solution You would need to install Mandriva&#8217;s openldap-clients package that includes the ldapsearch: sudo urpmi openldap-clients]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
You need to install OpenLDAP for testing the authentication against LDAP, but the command line utility ldapsearch is not installed in your system.</p>
<p><strong>Solution</strong><br />
You would need to install Mandriva&#8217;s openldap-clients package that includes the ldapsearch:</p>
<p><code>sudo urpmi openldap-clients</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2011/02/09/ldapsearch-openldap-mandriva/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Splitting big files (Rails log files) in Linux command line</title>
		<link>http://www.42.mach7x.com/2010/11/09/splitting-big-files-rails-log-files-in-linux-command-line/</link>
		<comments>http://www.42.mach7x.com/2010/11/09/splitting-big-files-rails-log-files-in-linux-command-line/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 11:20:09 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[Log files]]></category>
		<category><![CDATA[Splitting]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=273</guid>
		<description><![CDATA[Problem You want to examine some big log files (ie Rails production files), on the command line in Linux but they are quite big. Solution You can use cat and grep to look for a specific part in the log files. You can also use grep with the A and B parameters to specify how [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
You want to examine some big log files (ie Rails production files), on the command line in Linux but they are quite big.</p>
<p><strong>Solution</strong><br />
You can use cat and grep to look for a specific part in the log files. You can also use grep with the A and B parameters to specify how many lines you want to include before and after the search text, but maybe you want to have chunks of the logs to examine. In that case you can use split to split them up in smaller files:</p>
<p><code>split --bytes=10M input_log_file.log [output_files_or_directory]</code></p>
<p>In that case you will be splitting your log file on size (&#8211;bytes variable), so you can decide depending on the total size of the log file how many files you want. The output files or directory is optional and if you leave it empty it will create the files in your current directory.</p>
<p>You can also split by the number of lines you want in each file like:</p>
<p><code>split --lines=15000 input_log_file.log [output_files_or_directory]</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/11/09/splitting-big-files-rails-log-files-in-linux-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Video playing too fast in mplayer (Mandriva)</title>
		<link>http://www.42.mach7x.com/2010/09/06/video-playing-too-fast-in-mplayer-mandriva/</link>
		<comments>http://www.42.mach7x.com/2010/09/06/video-playing-too-fast-in-mplayer-mandriva/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 13:16:52 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Mandriva]]></category>
		<category><![CDATA[Mplayer]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=222</guid>
		<description><![CDATA[Problem The video playback in mplayer (or any other media player), in Mandriva 2010.0 plays too fast. Solution According to the errata in the Mandriva website here you only have to add the following to your ~/.mplayer/config file: vo=x11]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
The video playback in mplayer (or any other media player), in Mandriva 2010.0 plays too fast.</p>
<p><strong>Solution</strong><br />
According to the errata in the Mandriva website <a href="http://wiki.mandriva.com/en/2009.1_Errata">here</a> you only have to add the following to your ~/.mplayer/config file:</p>
<p><span class="code"><br />
 vo=x11<br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/09/06/video-playing-too-fast-in-mplayer-mandriva/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>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[linux]]></category>
		<category><![CDATA[Mandriva]]></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>Mandriva 2010, Dell Vostro 430, Broadcom Netlink BCM57780 problem</title>
		<link>http://www.42.mach7x.com/2010/03/11/mandriva-2010-dell-vostro-430-broadcom-netlink-bcm57780-problem/</link>
		<comments>http://www.42.mach7x.com/2010/03/11/mandriva-2010-dell-vostro-430-broadcom-netlink-bcm57780-problem/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 16:15:26 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Mandriva]]></category>
		<category><![CDATA[broadcom]]></category>
		<category><![CDATA[Dell Vostro 430]]></category>
		<category><![CDATA[mandriva 2010]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=167</guid>
		<description><![CDATA[Problem Just recently installed Mandriva 2010 in a new Dell Vostro 430 and the network card (Broadcom Netlink BCM57780) was not recognized. Solution Add the following to the /etc/modprobe.conf file: sudo vi /etc/modprobe.conf install tg3 /sbin/modprobe broadcom; /sbin/modprobe/ &#8211;ignore-install tg3]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
Just recently installed Mandriva 2010 in a new Dell Vostro 430 and the network card (Broadcom Netlink BCM57780) was not recognized.</p>
<p><strong>Solution</strong><br />
Add the following to the /etc/modprobe.conf file:<br />
<span class="code">sudo vi /etc/modprobe.conf</span><br />
<span class="code">install tg3 /sbin/modprobe broadcom; /sbin/modprobe/ &#8211;ignore-install tg3</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/03/11/mandriva-2010-dell-vostro-430-broadcom-netlink-bcm57780-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting Paradox tables to MySQL sql in Linux</title>
		<link>http://www.42.mach7x.com/2008/04/21/converting-paradox-tables-to-mysql-in-linux/</link>
		<comments>http://www.42.mach7x.com/2008/04/21/converting-paradox-tables-to-mysql-in-linux/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 13:11:07 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[exporting]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[paradox]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=28</guid>
		<description><![CDATA[Problem You want to convert some legacy tables created in Paradox (.db, .px) to another format so you can use it in MySQL. Solution Download the px tools from here. Follow the instructions, in the INSTALL file after you untar the file. You should have to do the usual three step linux installation: configure make [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
You want to convert some legacy tables created in Paradox (.db, .px) to another format so you can use it in MySQL.</p>
<p><strong>Solution</strong><br />
Download the px tools from <a href="http://jan.kneschke.de/projects/pxtools/">here</a>.</p>
<p>Follow the instructions, in the INSTALL file after you untar the file.<br />
You should have to do the usual three step linux installation:</p>
<pre class="code">configure
make
sudo make install</pre>
<p>Afterwards to make sure that the .db file is a paradox file run:</p>
<pre class="code">pxinfo -f  path/to/paradox/db/file.db</pre>
<p>The program should read the header and report back with something along the lines:</p>
<pre class="code">File-Version: Paradox 7.x
Filetype: indexed .DB
....</pre>
<p>To export each Paradox db file to an sql statement run the following:</p>
<pre class="code">pxsqldump -d mysql -f path/to/paradox/file.db > path/to/mysql/exported/file.sql</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2008/04/21/converting-paradox-tables-to-mysql-in-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing sqlite3-ruby in Mandriva and Rails 2.0.2</title>
		<link>http://www.42.mach7x.com/2008/04/11/installing-sqlite3-ruby-in-mandriva-and-rails-202/</link>
		<comments>http://www.42.mach7x.com/2008/04/11/installing-sqlite3-ruby-in-mandriva-and-rails-202/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 15:48:36 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[Mandriva]]></category>
		<category><![CDATA[ruby on rails 2.0.2]]></category>
		<category><![CDATA[sqlite3-ruby]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=26</guid>
		<description><![CDATA[Problem After upgrading to Rails 2.0.2 when trying to install the sqlite3-ruby gem got the following error: ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb install sqlite3-ruby checking for sqlite3.h... no make make: *** No rule to make target `ruby.h', needed by `sqlite3_api_wrap.o'. Stop. Gem files will remain installed in [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
After upgrading to Rails 2.0.2 when trying to install the sqlite3-ruby gem got the following error:</p>
<pre class="code">
ERROR:  Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb install sqlite3-ruby
checking for sqlite3.h... no
make
make: *** No rule to make target `ruby.h', needed by `sqlite3_api_wrap.o'.  Stop.
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/ext/sqlite3_api/gem_make.out</pre>
<p><strong>Solution</strong><br />
In Mandriva you need to install the ruby-sqlite3 and the development libraries first, like:</p>
<pre class="code">sudo urpmi ruby-sqlite3
sudo urpmi libsqlite3-devel</pre>
<p>After that you should be able to install the gem as normal.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2008/04/11/installing-sqlite3-ruby-in-mandriva-and-rails-202/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

