Category: Ruby

How to Run a Rake Task via Cron Under RVM

Cron needs to be explicitly told which RVM to use, the easiest way to do that is to pretend to open up a bash shell (as all the pre-reqs are loaded by default). Save your afternoon and reuse the following in your crontab: /bin/bash -l -c ‘cd PATH/TO/RAILS/APP && $HOME/.rvm/gems/THE_RVM_RUBY_TO_USE/bin/rake RAILS_ENV=production THE_TAKS:TO_RUN –trace’ for me, […]

Adding Custom Fields to an Existing Post via XMLRPC in WordPress

If you’re having difficulty adding custom fields to an existing WordPress posts via XMLRPC’s metaWeblog.EditPost command, try including a dummy entry in your code. It worked for me. I’m working on a project where we’re programmatically adding WordPress custom field data to thousands of posts, seemed like a great job for XMLRPC. I had assumed […]

Kernest’s Web Font Serving Engine – Fontue – Now Open Source

I’ve talked to a number of people and organizations that want to start adding web fonts to their websites – but aren’t comfortable relying on a third-party service for something so integral to their online presence. With that in mind, I’m pleased to announced that Kernest‘s underlying web font serving engine – dubbed Fontue – […]

Installing ImageMagick & RMagick on OS X 10.6 Snow Leopard

This marks hour 4 of setting up ImageMagick & RMagick on my MacBook Pro – without MacPorts (MacPorts and I had a falling out years ago). In an effort to save all of us that time, here’s how I got ImageMagick and RMagick working on my MacBook Pro running 10.6.2 Snow Leopard Download and unpack […]

auth via params API Access with Authlogic

Authlogic, my current favorite Ruby-based authentication library and I were in a fight the last couple of days. I was trying to add token-based, auth_via_params, authentication (vs. login and password) to a project – but Authlogic and I weren’t agreeing on how it should be done. I had assumed: @person_session = PersonSession.new(single_access_token => params[:token] ) […]

Introducing: RE07.US – The Greenest URL Shortener

According to a recent post by FuelInteractive.com, a link in Twitter is clicked for 5 minutes, then completely ignored. That got me thinking about all the wasted short urls out there. So many tinyurl, culld.us, is.gd, et al, links just collecting dust after all that initial clicking. Seems so wasteful considering “the current economic climate”. […]