Git clone Feather and use edge branch

Posted by Peter
on Jul 22, 08
git clone git://github.com/mleung/feather.git

git branch -a
List all local and remote branches

git checkout -b edge origin/edge
Creates a new local 'edge' branch from the cloned 'edge' branch
This also sets up things so that pull and merge work correctly
You are on Feather edge

git checkout master
Returns to master branch

Datamapper Timestamps

Posted by Peter
on Jul 18, 08
If you want your created_at, updated_at, created_on and updated_on fields automatically set in your Datamapper model, you need to require 'dm-timestamps' before.


require 'dm-timestamps'

class Asset
include DataMapper::Resource

property :id, Integer, :serial => true
property :created_at, DateTime
property :updated_at, DateTime
end

Releasing Feather Pages plugin

Posted by Peter
on Jun 08, 08
It was very fun to learn more about Feather internal hooks and how to create a plugin. I found very interesting how it can interact with the base blog engine and with other plugins letting you register a partial to a specific view hook point, for example the Pages plugin list all pages and sub pages in the sidebar and each one display your meta description and keywords in the header for better SEO.



Your query failed 'MySQL server has gone' away

Posted by Peter
on May 31, 08
My blog was getting an error every once in a while, probably if no connection was made in 8 hours.

This happens because neither AR and Datamapper close their connections letting the database to take care of it, so I tried to change MySQL setting to:

wait_timeout = 259200

but this won't help me much so I will try some hacking tonite and update this post again.

Feather Error: undefined method `empty?' for nilNilClass

Posted by Peter
on May 22, 08
You are setting up your Feather, excited to write your first post but you see is an error like this:

undefined method `empty?' for nil:NilClass

This is an issue in Merb 0.9.3 with page caching and there is a patch you can run to fix it for now until the next Merb release.
View patch.
Happy blogging.

Merbing on Feather

Posted by Peter
on May 21, 08
This blog is running on this simple yet powerful Merb blogging engine with plugins available to enhance your online diary, journal, personal thoughts or learning experiences.