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, […]
Category: Ruby
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 […]
RESTful Blogging via Email w/ Sinatra?
Somewhere in my travels I thought I saw a project that uses Sinatra and some very RESTful URLs to do blogging via email. Now I can’t find it. If you’ve seen this as well – leave a message in the comments. If I can’t find it in a couple of days, I think I know […]
Fontue Font Optimization Workflow – Open Sourced
With the Fontue web font server open sourced, I’ve done the same for the workflow scripts I use to to generate the fonts for @font-face use. It’s a pair of scripts that pipe fonts in and out of other conversion programs like FontForge, sfnt2woff, Batik, and EOTFast. Along the way, doing a little clean up […]
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 […]
Passenger + Sinatra Tip: DocumentRoot is Always /public
I was getting 403 errors after deploying my newest Sinatra app with Passenger. Turns out Passenger assumes and requires a /public folder. This app is so tiny and new, it didn’t have one yet – so I was pointing Passenger at the app’s root. Resulting in the 403 errors. Solution: Create an empty /public folder […]
Garrick Talking Sinatra.rb – Chippewa Valley Code Camp – Nov. 14 2009
On Saturday, November 14, 2009, I’ll be giving a talk on the Sinatra web framework at the Chippewa Valley Code Camp – held in UW-Stout’s Millennium Hall. It should be fun, especially since Justin Grammens and Sam Schroeder are also on the schedule talking iPhone Development.
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”. […]