Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

LABS
Standup 3/1/07

We’re experimenting with running our Capistrano deploy onto a Mac Mini. Note that this is Capistrano running Net::SSH running ssh protocol and spawing a remote shell in which we execute commands. Unfortunately, the remote process can’t find the svn binary. Even though running echo $SHELL returns /bin/bash, it’s not executing any of the startup scripts we know about (~/.bashrc, ~/.bash_profile, /etc/environment, /etc/profile, etc.), and the PATH is remaining the boring standard one (/usr/bin:/bin:/usr/sbin:/sbin). Damon says there’s a setting inside the sshd config that might help…

UPDATE: this was solved by setting

PermitUserEnvironment yes

in /etc/sshd_config, and then setting

PATH=/bin:/sbin:/user/sbin:/usr/local/bin:/usr/local/sbin:/opt/local/bin:/user/local/mysql-standard-5.0.24-osx10.4-i686/bin

in ~/.ssh/environment


Apparently the Rails rules for pluralizing controller names has changed. Recently the tendency seems to be to use plural names for RESTful controllers (e.g. GET /projects/42) rather than singular names for traditional controllers (/project/show/42). Is this intentional? Is it a new convention, or a change to the old one, or a violation?


We’re having a Brown Bag today on Ruby Foo, covering many strange and wonderful topics, including class methods, singleton classes, lexical scoping, and the lambda calculus. And why the sea is boiling hot, and whether pigs have wings.


Words of wisdom: when you’re modeling currency, don’t use floats. This is a bad idea in the long run since floats might store $2.50 as 2.50000001. See Coda Hale’s dollars_and_cents plugin. Ian adds: “Database tables for currency should be of type decimal. (e.g. amount DECIMAL(10,2)) This turns into a BigDecimal in your AR object, which is a bit of a pain, since it doesn’t act exactly like a regular number. We talked about mixing in some methods into BigDecimal, to make it behave more like a regular numeric type. It feels weird coming from a Java background, and normal coming from a Smalltalk background. I’m curious what people’s thoughts are on it.”


Today is the Group Hug for our latest release of Tracker. Get ready to try to kill Tracker with love!


We like RSpec, and are ready to upgrade to the new version. There’s a new style for the DSL; the old and new dialects will live side-by-side for a while but we should convert to use the new one soon.


Daylight Saving Time is coming up, and already it’s causing some of our tests to fail: we had code that calculated the number of days between two dates. Turns out the implementation assumed that every day has 24 hours in it. Not so! March 11, for instance, will have 23 hours, and November 4 will have 25. That’s in the US; see here for other countries.


Comments
Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *