Posted by theBlatherskite
Mon, 16 Apr 2007 05:16:00 GMT
I’ve been playing around with capistrano lately, and I think I’ve fallen in love. It was merely a convenience until that ill-fated deployment – that moment when, with panicked error messages scrolling across my screen and equally panicked (if less verbose) thoughts filling my head, a decisive cap rollback restored the calm.
Most recently, however, I discovered the cap disable_web and cap enable_web commands. These let you, with one command, push a helpful static ‘maintenance’ page out to the users while you do, well, maintenance. With a little customization, the page can be downright professional (at least, I like to think my implementation of it was).
Read more...
Posted in Ruby on Rails, Mini Tips | Tags capistrano, disable_web, rails, site5 | 3 comments
Posted by theBlatherskite
Wed, 04 Apr 2007 00:16:00 GMT
Looking for a way to set the rails environment for your script/runner cron jobs? I wasn’t, until yesterday at 6:30 PM when I updated my rails gem. Suddenly
/script/runnner -e production System.some_method
(which had been working fine) started throwing errors, which meant I had to endure cron yelling at me periodically until I found a fix. It was surprisingly difficult to locate information about such a simple issue, but I finally came across somebody with the info I needed.
The new, functioning form:
RAILS_ENV=production ./script/runner System.some_method
As a side note, is also works for setting the environment in script/console and, presumably, wherever else you’d need it.
Posted in Ruby on Rails, Mini Tips | Tags cron, environment, rails, RAILS_ENV | no comments