Fred Wu
CTO by day, freelancing software consultant by night. Founder of Persumi.
If you don’t already know, ’delayed_job’ is a database based asynchronously priority queue system extracted from Shopify.
I was seeking for a lightweight, easy to use solution for queueing tasks, ‘delayed_job’ fits the bill almost perfectly. ;)
One thing we needed to do for a Rails 2 project at Envato, was to queue the tasks and to run them one after another, at a set interval. 'delayed_job’ unfortunately doesn’t come with this feature.
So, instead of searching for more complicated solutions o...
[]
I need Textmate 2 (or a 3D monitor/projector) to come out sooner, otherwise there will be a day where I will just be totally lost in dozens of windows.
Rails 3 has recently renamed key method to to_key, which consequently rendered MongoMapper unusable.
You might see an error that looks like:
ActionView::Template::Error (undefined method `to_key' for #<Post:0x000001066e4020>)
After some twiddling I’ve submitted a patch to address this issue. Feel free to pull my fork until the fix makes its way into John Nunemaker’s main repository.
Initially developed by Yehuda Katz, the Textmate gem is an extremely handy tool for installing and managing your Textmate bundle files.
The tool works very well, for the most part. But due to the way the GitHub search query was built, the tool failed at finding Textmate bundles that do not honour the ’-tmbundle’ suffix in the name of their repositories.
I was waiting for GitHub to fix their API bug which I reported here, but today I discovered a workaround that solves this issue.
So, here, I p...
[]
I hate it when this happens and I have a dozen of Textmate and Terminal windows open…
If you are a Rails developers, chances are you have heard of, or are using either Devise or HAML in your projects.
And if you’re like me who uses both, then surely you’d wish these two worked together, i.e. generate devise views in HAML.
Today is your lucky day! I’ve just committed some changes that enable you to do so! The changes are already merged back to the primary repository.
In order to generate HAML views instead of ERb views, simply do:
rails g devise_views -t=haml
You can use t...
Did you know, you can perform advanced search queries on GitHub?
For example:
ruby AND (textmate OR tmbundle)
The above query will search everything containing ruby, as well as either textmate or tmbundle.
Unfortunately at this stage the GitHub API does not support it. I’ve opened a ticket here.
Web applications normally have many forms. Building forms is always a mind-boggling task because it involves repetition and chaos.
A shortcut is to use a form builder / DSL, such as Formtastic.
As I am using Rails 3, and the Rails 3 port of Formtastic isn’t complete yet, I thought I’d just use the plain vanilla Rails built-in form helper.
First of all, I am using Haml instead of ERb. Already, I got the out-of-box clean looking Haml markup.
Some of you might not be aware of the fact that Rails...
[]
This is from an email newsletter I received in my Gmail inbox from Macheist. Note to all the designers out there, please don’t use fancy CSS, not even some of the basic ones, because they don’t work in email clients! Here’s a great table of contents on what you can and cannot use for different email clients.