Zach Brock's blog



Zach BrockZach Brock
Standup 04/15/2010 - iconv and EY+JRuby
edit Posted by Zach Brock on Thursday April 15, 2010 at 03:06PM

Ask for Help

  • Anyone have advice for loading seed data in both regular and test environments? One of our projects has some data that is necessary to bootstrap the app into a working state and they'd like it to be in the database for all their tests as well.

  • EngineYard Cloud installs a weird version of JRuby. Some of the standard command line options don't seem to work. Anyone have a pointer to a good chef recipe for getting JRuby up and running on EYCloud?

Interesting Things

  • Ever get a UTF-8 file with messed up encoding? If all the bytes are still in the right order, try using iconv to fix it. Telling iconv to convert from UTF-8 to UTF-8 fixed a file that had been emailed to one of our projects.
    iconv -f UTF-8 -t UTF-8 es.yml > es2.yml

Zach BrockZach Brock
Standup 04/14/2010 - MySQL and Cloudfront
edit Posted by Zach Brock on Thursday April 15, 2010 at 03:00PM

Interesting Things

  • One of our teams saw a significant (20%+) speedup on their product by switching to Amazon's Cloudfront service. They're using Paperclip and it only took about 20 minutes to switch from S3 to Cloudfront.

  • If you have an integer column in MySQL that does not allow NULL values and you update a row and set that column to NULL the column ends up being set to 0. This was very surprising to one of our teams.

Zach BrockZach Brock
Standup - 04/10/2009
edit Posted by Zach Brock on Friday April 10, 2009 at 05:28PM

Interesting

Transparent PNGs and IE6 - Check out this awesome article about making gracefully degrading PNGs with transparency. With a little PNG8 trickery you can use alpha channel transparency without worrying that your page will look totally awful in IE6.

Rubymine 824 - No immediately obvious new bugs and a few teams are using it successfully. A step in the right direction!

Zach BrockZach Brock
Standup - 04/03/2009
edit Posted by Zach Brock on Monday April 06, 2009 at 04:04AM

Interesting

Hpricot 0.8 - This version doesn't seem to work. The solution seems to be to downgrade to 0.6 or switch to Nokogiri

Rubymine 820 - Autosave is back! Well, about 95% of the time.

Zach BrockZach Brock
Standup - 03/20/2009
edit Posted by Zach Brock on Friday March 20, 2009 at 05:17PM

Help

SMTP monitoring - Is there a simple way to set up a rails app to receive email and act on it? Suggested solution was to set up something with action mailer and script/runner to do an action whenever an email is detected.

Git ambiguous SHA1 - A CI box was blowing up and complaining of an ambiguous SHA1 tag when trying to build a project. The 6 character shortened tag was apparently not recognize as unique enough even though nothing else in the git log had the same string. The team got around it by giving it a 7th character for that build but has no idea what could have caused it.

Complex RJS example - Does anyone have suggestions for where to look for good, easy to test complex uses of RJS? What is a good structure for your code and tests?

Replacing Fixture Scenarios - Fixture scenarios are blowing up on a project when trying to use Polonium. Anyone know of a good replacement? Suggestions:

Interesting

Xray - You can use the Xray Gem to get a java style thread dump when you kill -3 a ruby process. It can be really helpful for figuring out what's causing your thin/mongrel processes to thrash. update: See Steve's Post for more info.

Zach BrockZach Brock
Standup - 3/19/2009
edit Posted by Zach Brock on Friday March 20, 2009 at 05:20AM

Help

One of our teams ran into an issue with javascript in their staging environment so they turned on asset package caching in development to try and hunt it down. It was a hassle to remove the all.js and all.css files over and over when developing in order to get Rails to regenerate them. Is there a better way? The suggested solution was to just shell out before each request in development mode with rm public/stylesheets/all.js

Interesting

Desert, Rails 2.3 and some pivotal plugins aren't playing together very nicely at the moment, but it's being worked on and should be resolved fairly soon. For now if you're using Desert you probably shouldn't upgrade.

Zach BrockZach Brock
Standup - 03/18/2009
edit Posted by Zach Brock on Wednesday March 18, 2009 at 04:12PM

Help

None today

Interesting

Windows Service Tip - If you're using Win32Utils and your process keeps dying, make sure you've put any code that takes more than 2 seconds into Daemon#service_init. See the Daemon documentation for more info.

Tech Talk on Compass - Chris Eppstein is giving a talk on Compass today at 12:30pm. If you can't make it today, you can catch it in a few weeks on the Talks page.