System-wide RVM installations are recommended for production deployments, but because /usr/bin/ruby is no longer the “correct” ruby, you need to tell all your moving parts about RVM.
Tag Archives: cron
HOWTO: simulate the cron environment
While banging my head on RVM + Rails 3 + crontabs, it became clear that I needed the cron environment in an interactive shell. It’s not hard:
sudo su env -i /bin/sh
If your SHELL in your crontab is /bin/bash:
sudo su env -i /bin/bash --noprofile --norc
Remember that the cron-invoked shell won’t have a tty, so some commands will behave differently. Also, if you’ve got a bunch of other environment variables set up in your crontab, you can do this trick from stackoverflow — create a one-off cron that writes env to a file, and load that env later.
OpenDNS updater for linux/ubuntu
The OpenDNS service is great — it provides anti-phishing and the ability to filter out some of the less desirable detritus from the internets.
OpenDNS needs to be periodically notified about what your IP address is, and I don’t have a windows or macintosh box that’s always on. I do have an ubuntu box, though, but there weren’t any instructions on OpenDNS’ site to do this properly.