In 2009 I attended Wordcamp Vancouver and actually met a handful of people I still talk to, tweet to and hang out with on a semi-regular basis. At the Wordcamp after party I was talking with @curtismchale and he mentioned although he didn’t do much ruby development he got together with the Fraser Valley Ruby Brigade on Wednesday nights in Abbotsford. He also mentioned they hang out on irc frequently and I should pop into the channel and say Hi.

Continue reading

One of the much larger Rails applications I work on makes heavy use of caching for obvious reasons. In some locations the cache isn’t auto-expiring at the moment. After doing a deployment I needed to expire these sections manually via the console for my first time. I grabbed the name of the fragment from the view where it was being cached. - cache('all_category_judges') do ... I only knew one way to access the cache in the console and attempted clearing the cache fragment from there.

Continue reading

Using: nginx version: nginx/1.2.4 I manage a few Linode instances as client servers but I would far from consider myself a sysadmin. I received an email from a client regarding some uploading issues. After some testing I concluded any combination of files over 1mb would raise Nginx 413 Request Entity Too Large I upped the file limit within the virtualhost file by changing the client_max_body_size upstream app { server unix:/tmp/app.sock fail_timeout=0; } server { listen 80; location / { proxy_pass http://app; proxy_redirect off; client_max_body_size 6m; } } This still did not work.

Continue reading

Today I was trying to generate a Rails 3.1.0 project (for testing purposes). I simply called rails new rollback which generated a rails 3.2.11 project and proceeded to change the gemfile version to 3.1.0. This resulted in numerous application errors. The simple solution was to generate the project with the Rails version 3.1.0. To do this call the gem with the version number as such: $ rails _3.1.0_ new rollback You also must already have this version of the gem installed on your system for it to work.

Continue reading

This week at the office I’ve been on a coding hiatus and just doing a lot of copy placement and markup. The client requested having a numbered list of categories separated by type headers. I added markup as such: %ul %li %h2 Video %ol %li Animation %li Documentary %li Music Video %li Narrative %li Poetry/Experimental %li Collaboration %li UNICEF Challenge %li %h2 Print %ol %li Photo Collection/Digital Story/Photo Essay %li Poster/Collage/Campaign Output:

Continue reading

I was writing a rake task to handle importing data from an older community system and needed to set a default value for anything that the old system didn’t have. I was using hashs and thought to myself “It would be sweet if hashs had defaults.” After a quick doc check I found out that hashs do infact support defaults. I encourage you to check out the Ruby Docs http://www.ruby-doc.org/core-1.9.3/Hash.html#method-i-default

Continue reading

Author's picture

Brian Pearce

Software Engineer, Endurance Cyclist,
Rubiest, and Rustacean

Software Engineer

Barcelona, Spain