<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>52&#176;: Blogging into the unknown - Home</title>
  <id>tag:www.52grad.net,2012:mephisto/</id>
  <generator uri="http://mephistoblog.com" version="0.8.0">Mephisto Drax</generator>
  <link href="http://www.52grad.net/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://www.52grad.net/" rel="alternate" type="text/html"/>
  <updated>2012-02-03T14:09:15Z</updated>
  <entry xml:base="http://www.52grad.net/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:www.52grad.net,2012-02-01:83</id>
    <published>2012-02-01T23:34:00Z</published>
    <updated>2012-02-03T14:09:15Z</updated>
    <category term="radiant"/>
    <category term="rails"/>
    <category term="ruby"/>
    <link href="http://www.52grad.net/2012/2/1/radiant-cms-friendly_id" rel="alternate" type="text/html"/>
    <title>Radiant CMS &amp; friendly_id</title>
<content type="html">
            I use Radiant CMS for some of application, still running on Rails 2.3.x. I wanted to make use of friendly_id in one of my models within a Radiant extension. So I added the following lines to my Gemfile:
&lt;pre class=&quot;brush: rb&quot;&gt;
gem &quot;friendly_id&quot;, &quot;3.0.6&quot; # I picked a version that requires active_support &gt;= 2.2
&lt;/pre&gt;
Next step is to run the friendly_id generator, which returned an error:
&lt;pre class=&quot;brush: bash&quot;&gt;
./script/generate friendly_id
Couldn't find 'friendly_id' generator
&lt;/pre&gt;
My solution to this problem was to copy the folder GEM_PATH/friendly_id/generators/friendly_id to RAILS_ROOT/lb/generators. 
Afterwards I added a line to script/generate:
&lt;pre class=&quot;brush: rb&quot;&gt;
class Rails::Generator::Base
  def self.use_application_sources!
    reset_sources
    sources &amp;lt;&amp;lt; Rails::Generator::PathSource.new(:builtin, &quot;#{RADIANT_ROOT}/lib/generators&quot;)
    plugins_path = File.expand_path(File.join(RAILS_ROOT, %w(vendor plugins)))
    sources &amp;lt;&amp;lt; Rails::Generator::PathSource.new(:&quot;plugins (vendor/plugins)&quot;, &quot;#{plugins_path}/*/**/{,rails_}generators&quot;)

    # Add other custom generators
    sources &amp;lt;&amp;lt; Rails::Generator::PathSource.new(:builtin, &quot;#{RAILS_ROOT}/lib/generators&quot;)
  end
end
&lt;/pre&gt;

UPDATE:
The easiest way to get around this issue is to copy create_slugs.rb to your migration and friendly_id to your lib/tasks folder.
          </content>  </entry>
  <entry xml:base="http://www.52grad.net/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:www.52grad.net,2012-01-26:82</id>
    <published>2012-01-26T12:26:00Z</published>
    <updated>2012-01-26T14:31:20Z</updated>
    <category term="Rails &amp; Ruby"/>
    <category term="logger"/>
    <category term="ruby"/>
    <category term="singleton"/>
    <link href="http://www.52grad.net/2012/1/26/ruby-singleton-logger" rel="alternate" type="text/html"/>
    <title>Ruby Singleton Logger</title>
<content type="html">
            &lt;p&gt;I have been working on a module lately that parses a XML file structure into a hash and writes it to a database. The module includes some classes and methods and I needed a central logger class.&lt;/p&gt;
&lt;p&gt;I created a class that inherits from &lt;a href=&quot;http://ruby-doc.org/stdlib-1.8.7/libdoc/logger/rdoc/Logger.html&quot;&gt;Ruby´s Logger class&lt;/a&gt;.&lt;/p&gt;
&lt;pre class=&quot;brush: rb&quot;&gt;
class MyLogger &amp;lt; Logger
end
&lt;/pre&gt;
&lt;p&gt;I decided to make this class a Singleton. Singleton is a design pattern that restricts instantiation of a class to only one instance that is globally available. This can e.g. be done by simply including the &lt;a href=&quot;http://ruby-doc.org/stdlib-1.8.7/libdoc/singleton/rdoc/index.html&quot;&gt;Singleton Module&lt;/a&gt;.&lt;/p&gt;
&lt;pre class=&quot;brush: rb&quot;&gt;
class MyLogger &amp;lt; Logger
  include Singleton
end
&lt;/pre&gt;
&lt;p&gt;I wanted this class to be able to either log to STDOUT or a file. The standard way to do this, is to pass the log device to the Logger class during &lt;a href=&quot;http://ruby-doc.org/stdlib-1.8.7/libdoc/logger/rdoc/Logger.html#method-c-new&quot;&gt;instantiation&lt;/a&gt;. The problem is that the singleton module creates the singleton instance before it is actually needed, called eager instantiation. In order to tell the singleton instance to which log device it should log to, we need to set a member variable in the initialize method. Secondly we need a method to reassign the log device.&lt;/p&gt;
&lt;pre class=&quot;brush: rb&quot;&gt;
class MyLogger &amp;lt; Logger
  include Singleton

  LOG_FILE = File.open(&quot;myfile.log&quot;,&quot;a&quot;)

  def initialize
    @logdev = Logger::LogDevice.new(LOG_FILE)
    @level = INFO
  end

  def change_logdev_to_stdout
    @logdev = Logger::LogDevice.new(STDOUT)
  end

end&lt;/pre&gt;
&lt;p&gt;I  could now use the logger methods from everywhere in my code, e.g.:&lt;/p&gt;
&lt;pre class=&quot;brush: rb&quot;&gt;MyModule::MyLogger.instance.info(&quot;Hello World!&quot;)&lt;/pre&gt;
&lt;p&gt;In order to make things a little bit shorter, I added an additional method to the module:&lt;/p&gt;
&lt;pre class=&quot;brush: rb&quot;&gt;
def self.logger
  return MyModule::MyLogger.instance
end
&lt;/pre&gt;
&lt;p&gt;Logging can now been done from everywhere by calling:&lt;/p&gt;
&lt;pre class=&quot;brush: rb&quot;&gt;MyModule::logger.info(&quot;Hello Universe!&quot;)&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://www.52grad.net/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:www.52grad.net,2012-01-10:81</id>
    <published>2012-01-10T14:11:00Z</published>
    <updated>2012-01-26T11:19:14Z</updated>
    <link href="http://www.52grad.net/2012/1/10/i-wanna-go-to-railsberry-yeah" rel="alternate" type="text/html"/>
    <title>I have got my ticket, yeah!</title>
<content type="html">
            
It was a huge run, but I was lucky. to get a ticket for &lt;a href=&quot;http://www.railsberry.com&quot;&gt;Railsberry&lt;/a&gt; in Kraków, Poland, in April 2012.
          </content>  </entry>
  <entry xml:base="http://www.52grad.net/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:www.52grad.net,2011-09-14:80</id>
    <published>2011-09-14T19:04:00Z</published>
    <updated>2012-01-26T16:20:57Z</updated>
    <category term="Rails &amp; Ruby"/>
    <category term="bundler"/>
    <category term="rails"/>
    <link href="http://www.52grad.net/2011/9/14/get-rid-of-bundle-exec" rel="alternate" type="text/html"/>
    <title>How to get rid of bundle exec</title>
<content type="html">
            I you feel bored by entering bundle exec (a command that executes a command in the context of the current bundle) if you want to execute a rake task, the folloowing code could help to get rid of it:
&lt;pre class=&quot;brush: bash&quot;&gt;bundle install --binstubs; export PATH=&quot;./bin:$PATH&quot;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://www.52grad.net/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:www.52grad.net,2011-07-23:77</id>
    <published>2011-07-23T12:33:00Z</published>
    <updated>2012-01-26T14:34:45Z</updated>
    <category term="pogoplug"/>
    <link href="http://www.52grad.net/2011/7/23/how-to-ssh-into-your-pogoplug" rel="alternate" type="text/html"/>
    <title>How to ssh into your pogoplug</title>
<content type="html">
            
&lt;p&gt;
I recently had to fix something on my pogoplug attached harddrive. When attaching it to my Mac the hdd was read-only, so I decided to attach it to the pogoplug again and try it using ssh.
&lt;/p&gt;
&lt;p&gt;
&lt;i&gt;To enable SSH, login to http://my.pogoplug.com, navigate to the Settings page, select Security Settings, and from the main pane, enable SSH for your Pogoplug. Choose your own SSH password.&lt;/i&gt;
&lt;/p&gt;
&lt;p&gt;
Open up a terminal and login:
&lt;pre class=&quot;brush: bash&quot;&gt;ssh root@your-host-or-ip&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;
Go to hdd (in my case):
&lt;pre class=&quot;brush: bash&quot;&gt;cd /tmp/.cemnt/mnt_sda1&lt;/pre&gt;
&lt;/p&gt;
Have fun!
          </content>  </entry>
  <entry xml:base="http://www.52grad.net/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:www.52grad.net,2011-06-19:76</id>
    <published>2011-06-19T19:41:00Z</published>
    <updated>2012-01-26T14:42:36Z</updated>
    <category term="Rails &amp; Ruby"/>
    <category term="bundler"/>
    <category term="rails"/>
    <category term="ruby"/>
    <link href="http://www.52grad.net/2011/6/19/how-to-get-rid-of-bundler-gemnotfound-error-at-domainfactory" rel="alternate" type="text/html"/>
    <title>How to get rid of Bundler::GemNotFound error at domainfactory</title>
<content type="html">
            Today I got stuck with an issue using Bundler at domainfactory for the first time. Although a gem was installed and bundle install ran fine, passenger reclaimed:
&lt;pre class=&quot;brush: bash&quot;&gt;
Could not find activesupport-2.3.11 in any 
of the sources (Bundler::GemNotFound)&lt;/pre&gt;
Thanks to my friend &lt;a href=&quot;http://stackoverflow.com/questions/5920872/ruby-on-rails-3-apache2-phusion-passenger-bundlergemnotfound-exception&quot;&gt;Stack Overflow&lt;/a&gt;, I could get rid of this problem by running:
&lt;pre class=&quot;brush: bash&quot;&gt;bundle install --path vendor/cache&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://www.52grad.net/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:www.52grad.net,2011-04-08:74</id>
    <published>2011-04-08T09:52:00Z</published>
    <updated>2011-04-08T09:57:59Z</updated>
    <category term="Rails &amp; Ruby"/>
    <category term="Tech stuff"/>
    <category term="rails"/>
    <category term="render"/>
    <category term="ruby"/>
    <link href="http://www.52grad.net/2011/4/8/render-action-in-rails" rel="alternate" type="text/html"/>
    <title>render :action in :rails</title>
<content type="html">
            &lt;p&gt;Although the &lt;a href=&quot;http://guides.rubyonrails.org/layouts_and_rendering.html#using-render&quot;&gt;Rails Guides&lt;/a&gt; say it is a newcomers issue, I also get sometimes confused with the render command:&lt;/p&gt;

&lt;cite&gt;&quot;Using render with :action is a frequent source of confusion for Rails newcomers. The specified action is used to determine which view to render, but Rails does not run any of the code for that action in the controller. Any instance variables that you require in the view must be set up in the current action before calling render.&quot;&lt;/cite&gt;
          </content>  </entry>
  <entry xml:base="http://www.52grad.net/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:www.52grad.net,2011-04-05:71</id>
    <published>2011-04-05T11:10:00Z</published>
    <updated>2012-01-26T11:28:41Z</updated>
    <category term="Tech stuff"/>
    <category term="gem"/>
    <category term="rails"/>
    <category term="ruby"/>
    <link href="http://www.52grad.net/2011/4/5/my-first-ruby-gem" rel="alternate" type="text/html"/>
    <title>My first ever ruby gem (pre-alpha)</title>
<content type="html">
            &lt;p&gt;Today I released my first-ever ruby gem, still pre-alpha but maybe of use for someone. The gem adds a climate classification parameter to a location object based upon observed or projected climate data. It is based upon the &lt;a href=&quot;http://en.wikipedia.org/wiki/K%C3%B6ppen_climate_classification&quot;&gt;Köppen climate classification&lt;/a&gt;, one of the most widely used climate classification systems.&lt;/p&gt;&lt;p&gt;Test it: &lt;a href=&quot;https://github.com/tpunkt/koeppen-geiger&quot;&gt;https://github.com/tpunkt/koeppen-geiger&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.52grad.net/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:www.52grad.net,2011-04-05:35</id>
    <published>2011-04-05T11:08:00Z</published>
    <updated>2012-01-26T14:46:06Z</updated>
    <category term="Tech stuff"/>
    <category term="mapserver"/>
    <category term="openlayers"/>
    <category term="performance"/>
    <category term="tilecache"/>
    <link href="http://www.52grad.net/2011/4/5/map-application-performance-tuning-part-2" rel="alternate" type="text/html"/>
    <title>Map Application Performance Tuning - Part 2</title>
<content type="html">
            &lt;p&gt;An advice for &lt;a href=&quot;http://mapserver.org/optimization/index.html&quot;&gt;optimizing&lt;/a&gt; the performance of Mapserver was to use &lt;a href=&quot;http://fastcgi.com&quot;&gt;FastCGI&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
1. I installed the FastCGI library with yast and downloaded the Apache2 module &lt;a href=&quot;http://www.fastcgi.com/dist/&quot;&gt;mod_fastcgi-2.4.6.tar.gz&lt;/a&gt;. After extracting it, I followed the configure, make, make install dance as described. Unfortunately the compiler complained about some missing stuff and I couldn´t figure out how to get the module installed. I gave it up and tried the &lt;a href=&quot;http://httpd.apache.org/mod_fcgid/&quot;&gt;mod_fcgid&lt;/a&gt; module from Apache itself that seemed to be quite similar.
&lt;/p&gt;
&lt;p&gt;
3. I extracted mod_fcgid-2.3.4.tar.gz to my home directory and followed the steps described in the README:&lt;br /&gt;
# APXS=/usr/sbin/apxs2 ./configure.apxs&lt;br /&gt;
# and following 'make'&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;
The compiler returned the same problem and complained about a missing mpm.h and mpm_default.h in /usr/include/apache2.
&lt;/p&gt;
I came around the problem by symlinking both files using:
&lt;pre class=&quot;brush: bash&quot;&gt;
ln -s ../apache2-prefork/mpm.h mpm.h
ln -s ../apache2-prefork/mpm_default.h mpm_default.h
&lt;/pre&gt;
&lt;p&gt;
After doing that both modules were build successfully into /usr/lib64/apache2.
&lt;/p&gt;
&lt;p&gt;
4. I added a configuration file to load the module in /etc/apache2/conf.d with the following entry:
&lt;pre class=&quot;brush: plain&quot;&gt;
LoadModule fastcgi_module /usr/lib64/apache2/mod_fastcgi.so
&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;
5. I restarted Apache with apache2ctl restart. The error_log in /var/log/apache2/ indicates that the module was loaded successfully:
&lt;pre class=&quot;brush: plain&quot;&gt;
Apache/2.2.10 (Linux/SUSE) mod_ssl/2.2.10 OpenSSL/0.9.8h mod_fastcgi/2.4.6 Phusion_Passenger/2.2.5 configured -- resuming normal operations
&lt;/pre&gt;
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.52grad.net/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:www.52grad.net,2011-04-05:34</id>
    <published>2011-04-05T11:07:00Z</published>
    <updated>2012-01-26T14:43:44Z</updated>
    <category term="Tech stuff"/>
    <category term="mapserver"/>
    <category term="openlayers"/>
    <category term="performance"/>
    <category term="tilecache"/>
    <link href="http://www.52grad.net/2011/4/5/map-application-performance-tuning-part-1" rel="alternate" type="text/html"/>
    <title>Map Application Performance Tuning - Part 1</title>
<content type="html">
            &lt;p&gt;
My current task is to improve the performance of a web application that runs on Apache 2.2.10 on OpenSuse 10.6, 64bit. It is a map application that works with &lt;a href=&quot;http://code.google.com/intl/de-DE/apis/maps/&quot;&gt;Google Maps JavaScript API&lt;/a&gt;, &lt;a href=&quot;http://www.openlayers.org&quot;&gt;OpenLayers JavaScript API&lt;/a&gt; on the client side and a &lt;a href=&quot;http://www.mapserver.org&quot;&gt;Mapserver&lt;/a&gt; on the server side.
&lt;/p&gt;
&lt;p&gt;
After discovering that the response time of my server was sometimes quite long (using firebug), I decided to start optimizing the server side application first.
&lt;/p&gt;
&lt;p&gt;
1. First step I did was installing &lt;a href=&quot;http://www.tilecache.org&quot;&gt;Tilecache&lt;/a&gt;, a Python-based server that caches tiles from different sources on disk. &lt;a href=&quot;http://tilecache.org/docs/README#installing-tilecache&quot;&gt;Installation&lt;/a&gt; is easy and straightforward. The test run worked correctly. 
&lt;/p&gt;
&lt;p&gt;
2. Figuring out how my application or better a OpenLayers.Layer.WMS object could request tiles via Tilecache that were formerly requested from Mapserver was a little bit &lt;a href=&quot;http://stackoverflow.com/questions/2058371/openlayers-mapserver-tilecache&quot;&gt;harder&lt;/a&gt;. First I had to install Python MapScript (to enable communication between Tilecache and Mapserver). which I managed by following the advices &quot;Building and Installing Python MapScript&quot; in Chapter 7 from the &quot;Beginning MapServer&quot; book from Bill Kropla. As far as I know now, each map that should be cached by and requested via Tilecache has to have a correct entry in tilecache.cfg.
&lt;/p&gt;
&lt;pre class=&quot;brush: plain&quot;&gt;
Example:
[worldtest]
layers = country
spherical_mercator = yes
extension = png
mapfile = mapfile.map
data_extent = -198.0,-115.542749339,198.0,109.146905833
type = MapServer
metatile = no
srs = EPSG:4326
metabuffer = 10,10
bbox = -198.0,-115.542749339,198.0,109.146905833
metasize = 5,5
extent_type=loose
&lt;/pre&gt;
&lt;p&gt;
This layer can requested via an OpenLayers.Layer.WMS object as follows:
&lt;pre class=&quot;brush: js&quot;&gt;
var layer = new OpenLayers.Layer.WMS(&quot;name&quot;,
  &quot;http://localhost/cgi-bin/tilecache/tilecache.cgi&quot;, {
  maxExtent:new OpenLayers.Bounds(1,2,3,4),
  maxResolution:156543.0339,
  layers:&quot;worldtest&quot;,
  transparent:true
});
&lt;/pre&gt;
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.52grad.net/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:www.52grad.net,2011-04-05:72</id>
    <published>2011-04-05T11:04:00Z</published>
    <updated>2011-04-05T11:14:39Z</updated>
    <category term="Tech stuff"/>
    <category term="ruby"/>
    <link href="http://www.52grad.net/2011/4/5/gem-server" rel="alternate" type="text/html"/>
    <title>gem server</title>
<content type="html">
            Great tip! Running &quot;gem server' fires up a server page on localhost:8808 that lets you crawl rdocs of all locally installed gems.
          </content>  </entry>
  <entry xml:base="http://www.52grad.net/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:www.52grad.net,2011-04-05:73</id>
    <published>2011-04-05T10:53:00Z</published>
    <updated>2011-04-05T12:03:25Z</updated>
    <link href="http://www.52grad.net/2011/4/5/open-a-gem-in-textmate" rel="alternate" type="text/html"/>
    <title>Open a gem in textmate</title>
<content type="html">
            &lt;p&gt;Add the following lines to .bash_profile:&lt;br /&gt;
alias ogem='gem open $1 -c mate'&lt;/p&gt;
&lt;p&gt;and then type: ogem [yourgem]&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.52grad.net/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:www.52grad.net,2011-04-04:33</id>
    <published>2011-04-04T11:07:00Z</published>
    <updated>2011-04-05T11:09:09Z</updated>
    <category term="Tech stuff"/>
    <category term="agile"/>
    <category term="scrum"/>
    <link href="http://www.52grad.net/2011/4/4/introduction-to-scrum" rel="alternate" type="text/html"/>
    <title>Introduction to SCRUM</title>
<content type="html">
            
While searching for a methodology to get some kind of structure into my software development process, I remembered &lt;a href=&quot;http://en.wikipedia.org/wiki/Scrum_%28development%29&quot;&gt;SCRUM&lt;/a&gt;. This video is an excellent introduction to this agile project methodology. Still have to figure out how to make this work in our special team and development situation.
          </content>  </entry>
  <entry xml:base="http://www.52grad.net/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:www.52grad.net,2011-04-03:32</id>
    <published>2011-04-03T11:07:00Z</published>
    <updated>2011-04-05T11:08:51Z</updated>
    <category term="Rails &amp; Ruby"/>
    <category term="Tech stuff"/>
    <category term="64bit"/>
    <category term="mysql"/>
    <category term="rails"/>
    <category term="rubygem"/>
    <category term="snow-leopard"/>
    <link href="http://www.52grad.net/2011/4/3/installing-mysql-and-mysql-gem-on-snow-leopard" rel="alternate" type="text/html"/>
    <title>Installing MySQL and mysql gem on Snow Leopard</title>
<content type="html">
            It´s really a hard job figuring out how to get MySQL and mysql gem up and running on Snow Leopard 10.6.2. I followed the instructions of various posts but was not successful yet:&lt;br /&gt;&lt;br /&gt;
First I followed this instruction &lt;a href=&quot;http://hivelogic.com/articles/compiling-mysql-on-snow-leopard/&quot;&gt;http://hivelogic.com/articles/compiling-mysql-on-snow-leopard/&quot;&lt;/a&gt; and build MySQL Version 5.1.39 from source. It installed successfully. When trying to login using (mysql -u root -p) mysql returned the following error:  ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2), that obviously meant that the MySQL Server (mysqld) was not running (ps -axf | grep mysqld).
&lt;br /&gt;&lt;br /&gt;
which mysql: /usr/local/mysql/bin/mysql&lt;br /&gt;
which ruby: ruby 1.8.7 (2009-04-08 patchlevel 160) [i686-darwin9])&lt;br /&gt;
gem -v: 1.3.5&lt;br /&gt;
mysql: Server version: 5.1.39 MySQL Community Server (GPL)&lt;br /&gt;
&lt;br /&gt;
After a lot of googling around, I found out that&lt;br /&gt;&lt;br /&gt;
1. this command can start mysqld:&lt;br /&gt;
sudo /usr/local/mysql/bin/mysqld_safe --user=mysql &amp;
&lt;br /&gt;&lt;br /&gt;
2. The Preference Pane MySQL Tool is probably broken in Mac OS X 10.5 and higher
&lt;br /&gt;&lt;br /&gt;
3. This command should install the mysql gem correctly on Snow Leopard:&lt;br /&gt;
sudo gem uninstall mysql&lt;br /&gt;
sudo env ARCHFLAGS=&quot;-arch x86_64&quot; gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config&lt;br /&gt;
 (See this post: &lt;a href=&quot;http://stackoverflow.com/questions/1366746/gem-install-mysql-failure-in-snow-leopard&quot;&gt;http://stackoverflow.com/questions/1366746/gem-install-mysql-failure-in-snow-leopard&lt;/a&gt;
&lt;br /&gt;&lt;br /&gt;
It ended up that I got the following error using something like rake db:create:&lt;br /&gt;
dyld: lazy symbol binding failed: Symbol not found: _mysql_init
  Referenced from: /opt/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/lib/mysql_api.bundle
  Expected in: flat namespace

dyld: Symbol not found: _mysql_init
  Referenced from: /opt/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/lib/mysql_api.bundle
  Expected in: flat namespace
&lt;br /&gt;&lt;br /&gt;
This error led me to the following post: &lt;a href=&quot;http://cho.hapgoods.com/wordpress/?p=158&quot;&gt;http://cho.hapgoods.com/wordpress/?p=158&lt;/a&gt;, that basically tells me that the Ruby Version that came together with XCode 3.0 does not work in 64bit environments and a solution could be to install the 32bit version. Arrrgghh!

&lt;br /&gt;&lt;br /&gt;
The first answer to my &lt;a href=&quot;http:&quot; /&gt;http://trac.macports.org/wiki/Migration&lt;/a&gt;
          </content>  </entry>
  <entry xml:base="http://www.52grad.net/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:www.52grad.net,2011-04-02:31</id>
    <published>2011-04-02T11:07:00Z</published>
    <updated>2011-09-12T07:57:55Z</updated>
    <category term="Rails &amp; Ruby"/>
    <category term="cms"/>
    <category term="rails"/>
    <category term="ruby"/>
    <link href="http://www.52grad.net/2011/4/2/ruby-rails-cms" rel="alternate" type="text/html"/>
    <title>Ruby, Rails &amp; CMS</title>
<content type="html">
            Excellent article from Aaron Longwell about the Ruby on Rails CMS dilemma:
&lt;a href=&quot;http://aaronlongwell.com/2009/06/the-ruby-on-rails-cms-dilemma.html&quot;&gt;http://aaronlongwell.com/2009/06/the-ruby-on-rails-cms-dilemma.html&lt;/a&gt;
          </content>  </entry>
</feed>

