Posted by Scott on Feb 18th, 2008
Do you need your monthly dose of hanging out with Ruby and Rails developers and learning cool stuff? Well lucky for you, the next NHRuby.org meeting is in just a couple of days. Nick and I will be giving “lightning talks” on a number of topics. One of mine will be on writing an AIM bot to send you instant messages from your web application. Meeting details and directions can be found on the wiki.
Posted by Scott on Feb 17th, 2008
I recently updated my Rails deployment server from CentOS 4 to CentOS 5, and immediately ran into the following error when deploying my apps using vlad:
sudo: sorry, you must have a tty to run sudo
Thus apache wasn’t being restarted after my mongrel instances. It turns out that RHEL/CentOS 5 includes added restrictions in its default sudo configuration. Simply comment out the following line in /etc/sudoers:
#Defaults requiretty
to resolve the problem.
Posted by Scott on Jan 11th, 2008
Be sure to swing by RMC Research in Portsmouth next Tuesday for the first NHRuby.org meeting of 2008. Nick Plante and I will be presenting on a couple of Rails-related topics. Nick will show you how to add OpenID goodness to your Rails app of choice, and I’ll be discussing the ins and outs of ActionMailer, which handles sending and receiving e-mail in Rails.
More details and directions to the meeting can be found, as usual, on the NHRuby wiki. We could really use some new guest speakers for upcoming meetings, so if you’re interested please drop me a line – scottruby at zenlinux dot com.
Posted by Scott on Jan 6th, 2008
Vlad the Deployer is currently broken with rake v0.8. You can either downgrade the rake gem and stick with v0.7, or make the following change in the vlad gem’s lib/rake_remote_task.rb on line 108:
def execute(rake_t)
Thanks to Brian Palmer for this workaround. I hope the vlad crew will get around to another release soon.
Update: vlad 1.2.0 has been released and now works with both rake 0.8 and 0.7. Thanks guys!
Posted by Scott on Dec 5th, 2007
NetBeans 6.0 final (my Ruby/Rails/C/C++ IDE of choice) was released a couple of days ago. Pat Eyler posted on his blog an interview with Tor Norbye, which outlines many of the spiffy features of NetBeans 6 and some of the challenges in writing IDE tools for a dynamic language such as Ruby.
Posted by Scott on Dec 2nd, 2007
I recently discovered that my Rails model validations could be easily bypassed or broken by adding whitespace to the beginning or end of strings as they are entered in forms. For example, if your user account system is based on the uniqueness of email addresses, “joe@example.com” and ” joe@example.com” would validate as unique. This is something that nearly every webapp I can think of would want to avoid.
Fortunately there is a simple Rails plugin, strip_attributes, which will take care of this easily and efficiently. You can enable it on a per-model or per-field basis if you need fine-grained control. See the Rails wiki for more details.
In other news, there will be no December meeting of the NH Ruby and Rails User Group. Enjoy the holidays!
Posted by Scott on Nov 25th, 2007
Because it’s an enjoyable language to program in. Thank you, Giles, for reminding us about the importance of this factor.
Posted by Scott on Nov 8th, 2007
Don’t forget, the next meeting of the NH Ruby and Rails User Group is coming early this month. We’ll be meeting on Monday, November 12. Guest speaker and author David Berube will be discussing reporting using Ruport and various other tools. He knows a bit about this topic since he has a book forthcoming on the subject in early 2008.
I’ll also spend a few minutes discussing how to keep your mongrel processes under the watchful eye of monit. This is an outstanding utility that has many uses in systems administration.