Archive for June, 2009

Ferret: undefined method `find_by_contents’ error and solution

Posted: June 20, 2009 | Categories: Uncategorized | No Comments

Problem
When trying to use the acts_as_ferretĀ  the following error appears:

undefined method `find_by_contents'

Solution
It seems that the API of the plugin has changed, and the

find_by_contents

method should be replaced with:

find_with_ferret

Nginx redirect for /blog

Posted: June 7, 2009 | Categories: Uncategorized | No Comments

It took me quite a while to figure out how to do an Nginx redirect for http://docley.com/blog

Here is how to do it:

## NGINX: permanently redirect local url to /blog

server {
    listen   80;
    server_name docley.com;

    location /blog {
      rewrite ^ http://docleyblog.com permanent;
    }
}