My Profile Photo

rubycoloredglasses


I'm Jason, a web applications developer in the San Francisco Bay area.


  1. Error when building PhantomJS 2.0

    I was tasked with installing PhantomJS 2.0 on an Ubuntu 14.04 VPS running with 2 GB of RAM. Online discussions on Github and Google Groups seemed to have pointed to the build process requiring much RAM to complete without error. …


  2. Setup Environment for Django Development

    Although this website is primarily devoted to Ruby / Rails development, I’ve found it necessary to learn Python for a new position I might take in the upcoming year. Here is my guide for setting up your local workstation for Python / Django development on a Mac OS X workstation. …


  3. Issues with RVM after upgrade to OS X Mavericks

    So I just upgraded to OS X Mavericks (10.9.5). I also upgraded to X Code 6, and also installed the command line tools via the xcode-select --install command. I also have the ‘apple-gcc42’ Homebrew package installed to provide GCC 4.2. …


  4. Bypassing the AngularJS router for anchor tags

    I’m working with a Rails application that is using an AngularJS front-end. We are using routing to override the behavior of anchor tags to ensure that they load other templates with controllers, as defined in our routeConfiguration.js. This works out great most of the time, unless you need to override the routing so that your anchor tag can point to an end-point served by your Rails back-end. In my case, I’m linking to an end-point that serves a named CSV file. Without any sort of over-ride, I was finding that the default fallback behavior defined by the otherwise() method was occurring. In my case this was a 404 page template that loaded. …


  5. Sharing Administrative Rights with Homebrew

    I installed Homebrew on my work computer, and have installed many ports using Homebrew from an account on my machine. This has resulted in all of the files and folders managed by Homebrew being owned by the user account I installed the ports from, with ‘admin’ group ownership. …


  6. InstructureCon Hack Day

    The opinions or statements expressed herein should not be taken as a position of or endorsement by the University of California, Berkeley.


  7. Strong Parameters with Spree Extensions

    I’m currently working on an extension for Spree, an e-commerce solution for Ruby on Rails applications. The developer documentation for Spree is very helpful, letting developers know that they should use certain Ruby meta-programming methods to extend the functionality of the Spree system. The extension I’m working on was setup under a version of Spree that used Rails 3. …


  8. Ruby Class Name

    I noticed that in a module used on the CalCentral project that logger expressions used in a module referenced ‘self.name’ many times. I checked ApiDock.com for a reference to this class in the Ruby or Rails documentation, but I couldn’t find one. The module itself didn’t define a #name method, so I was perplexed. …


  9. Using 'for in' in Javascript

    Today our lead front-end developer pointed out to me that when using a ‘for in’ loop in Javascript that you want to make sure to use hasOwnProperty() on the element to make sure it belongs to the object, and not properties that were inherited through the prototype chain. …


  10. How to 'head' a text file in Ruby

    I wanted to just view the first 20 lines of a 10,000 line CSV file returned by an API in a Ruby on Rails project I’m working on. Here is the chain of Ruby commands I came up with to effectively ‘head’ the CSV document returned. …