<?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; gem</title>
	<atom:link href="http://www.42.mach7x.com/tag/gem/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>Mandriva &#8211; Rails 2.3.2 &#8211; mysql gem &#8211; &#8216;ERROR:  Error installing mysql&#8217;</title>
		<link>http://www.42.mach7x.com/2009/04/29/mandriva-rails-232-mysql-gem-problem/</link>
		<comments>http://www.42.mach7x.com/2009/04/29/mandriva-rails-232-mysql-gem-problem/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 12:29:32 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Mandriva]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[ruby on rails 2.3.2]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=101</guid>
		<description><![CDATA[Problem You are trying to install the mysql gem in Mandriva, but it fails with error messages: ERROR: Error installing mysql: ERROR: Failed to build gem native extension... checking for mysql_query() in -lmysclient... no .... Solution After searching in google, with solutions about providing different options (&#8211; &#8211;with-mysql-config, ..etc), even trying different combinations for providing [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
You are trying to install the mysql gem in Mandriva, but it fails with error messages:</p>
<pre class="code">ERROR:  Error installing mysql:
ERROR: Failed to build gem native extension...
checking for mysql_query() in -lmysclient... no ....</pre>
<p><strong>Solution</strong><br />
After searching in google, with solutions about providing different options (&#8211; &#8211;with-mysql-config, ..etc), even trying different combinations for providing the client library path, the configuration file, or the header file path, was still faced with the same error installing the mysql gem.<br />
As the Mandriva installation was quite new, it turns out to be a couple of missing packages.<br />
So try:</p>
<pre class="code">urpmi gcc
urpmi make</pre>
<p>and run:</p>
<pre class="code">gem install mysql</pre>
<p>again.</p>
<p>It should work out ok install the gem and output:</p>
<pre class="code">Building native extensions. This could take a while...
Successfully installed mysql-2.7
1 gem installed</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2009/04/29/mandriva-rails-232-mysql-gem-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FBML Error (line 5): illegal tag &#8220;body&#8221; under &#8220;fb:canvas&#8221;</title>
		<link>http://www.42.mach7x.com/2008/10/02/fbml-error-line-5-illegal-tag-body-under-fbcanvas/</link>
		<comments>http://www.42.mach7x.com/2008/10/02/fbml-error-line-5-illegal-tag-body-under-fbcanvas/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 11:07:05 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[facebooker]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=54</guid>
		<description><![CDATA[Problem When trying to use facebooker according to the Developing facebook platform applications with rails book, in the network_test step you are getting the following error: FBML Error (line 5): illegal tag "body" under "fb:canvas" Solution It should be caused because you are using the facebooker gem instead of the plugin. Install the plugin: ruby [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
When trying to use facebooker according to the <a href="http://www.pragprog.com/titles/mmfacer/developing-facebook-platform-applications-with-rails">Developing facebook platform applications with rails</a> book, in the network_test step you are getting the following error:</p>
<pre class="code">FBML Error (line 5): illegal tag "body" under "fb:canvas"</pre>
<p><strong>Solution</strong><br />
It should be caused because you are using the facebooker gem instead of the plugin.<br />
Install the plugin:</p>
<pre class="code">ruby script/plugin install git://github.com/mmangino/facebooker.git</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2008/10/02/fbml-error-line-5-illegal-tag-body-under-fbcanvas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading Ruby on Rails application from 1.2.3 to 2.0.2</title>
		<link>http://www.42.mach7x.com/2008/05/24/upgrading-ruby-on-rails-application-from-123-to-202/</link>
		<comments>http://www.42.mach7x.com/2008/05/24/upgrading-ruby-on-rails-application-from-123-to-202/#comments</comments>
		<pubDate>Sat, 24 May 2008 12:47:24 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[1.2.3]]></category>
		<category><![CDATA[2.0.2]]></category>
		<category><![CDATA[environment.rb]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[secret_key]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[upgrading]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=35</guid>
		<description><![CDATA[Problem Upgrading an existing Ruby on Rails application from 1.2.3, to 2.0.2, presents few problems. I will try and keep a record of the ones I encounter along the way, here. Solution Change the config/environment.rb to let the application know to use the 2.0.2 gem rail version, change the following line from: RAILS_GEM_VERSION = '1.2.3' [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
Upgrading an existing Ruby on Rails application from 1.2.3, to 2.0.2, presents few problems. I will try and keep a record of the ones I encounter along the way, here.</p>
<p><strong>Solution</strong></p>
<ol>
<li>Change the config/environment.rb to let the application know to use the 2.0.2 gem rail version,</li>
<p>    change the following line from:</p>
<pre class="code">RAILS_GEM_VERSION = '1.2.3' unless defined? RAILS_GEM_VERSION</pre>
<p>    to:</p>
<pre class="code">RAILS_GEM_VERSION = "2.0.2" unless defined? RAILS_GEM_VERSION</pre>
<li>Run the following to generate the secret key for the application:</li>
<pre class="code">rake secret</pre>
<li>Copy the magic key in a new section in your config/environment.rb as in:</li>
<pre class="code">...

    # config.log_level = :debug

    # Your secret key for verifying cookie session data integrity.
    # If you change this key, all old sessions will become invalid!
    # Make sure the secret is at least 30 characters and all random,
    # no regular words or you'll be exposed to dictionary attacks.
    config.action_controller.session = {
      :session_key =&gt; '_yourapplication_session',
      :secret      =&gt; 'long_string_generated_from_rake_secret'
    }</pre>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2008/05/24/upgrading-ruby-on-rails-application-from-123-to-202/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading to Rails 2.0.2 problems/solutions</title>
		<link>http://www.42.mach7x.com/2008/04/08/upgrading-to-rails-202-problemssolutions/</link>
		<comments>http://www.42.mach7x.com/2008/04/08/upgrading-to-rails-202-problemssolutions/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 09:13:16 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[rails 2.0.2]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=25</guid>
		<description><![CDATA[Problem Upgrading from Rails version 1.2.3 to version 2.0.2. Following the suggestion in DH&#8217;s weblog here when using sudo gem install rails -y, it gets the trunk version of rails which at the time was 2.0.2.9216. This causes a few problems and breaks a few more things. Solution In order to get back to the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
Upgrading from Rails version 1.2.3 to version 2.0.2.<br />
Following the suggestion in DH&#8217;s weblog <a href="http://weblog.rubyonrails.org/2007/12/7/rails-2-0-it-s-done">here</a> when using sudo gem install rails -y, it gets the trunk version of rails which at the time was 2.0.2.9216.<br />
This causes a few problems and breaks a few more things.</p>
<p><strong>Solution</strong><br />
In order to get back to the latest stable version, you have to uninstall a few of the gems installed from the trunk version.<br />
If you have installed the latest version of top of an existing one using gems, then doing:</p>
<pre class="code">gem list --local</pre>
<p>will give you all the installed versions of the gems. Something like:</p>
<pre class="code">actionmailer (2.0.2.9216, 2.0.2, 1.3.3)
actionpack(2.0.2.9216, 2.0.2, 1.3.3)
rails(2.0.2.9216, 2.0.2, 1.2.3)
...</pre>
<p>Make sure you uninstall all the gems with version number 2.0.2.9216:</p>
<pre class="code">sudo gem uninstall rails
sudo gem uninstall actionmailer
sudo gem uninstall actionpack
sudo gem uninstall activerecord
sudo gem uninstall activeresource
sudo gem uninstall activesupport
sudo gem uninstall rails</pre>
<p>In each of the above commands the gem package manager should ask you to select the one you want to uninstall.<br />
Pick the one with the 2.0.2.9216 (or other version later than 2.0.2).</p>
<p>At the end if you list the gems again you should only have gems going up to version 2.0.2</p>
<p>An extra step I had to take for making the migrations work was to install rake again:</p>
<pre class="code">sudo gem install rake</pre>
<p>After all these my installation seems to be working fine again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2008/04/08/upgrading-to-rails-202-problemssolutions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

