My Profile Photo

rubycoloredglasses


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


  1. Advanced Use of Will_Paginate

    I’m building an index of contacts, displayed with paginated links provided by will_paginate. …


  2. Getting File object for Paperclip Attachment via S3

    I’m working on a project where we are using the Paperclip plugin for Ruby on Rails for file handling and associations with other models. …


  3. Issues with MacPorts After Upgrading to OS X Lion

    I realized this morning that I was having dependency issues with ImageMagick on my Mac, which I installed using MacPorts. I had recently upgraded to Mac OS X Lion, so it made sense that I needed to update the software to resolve the issues, much like I had when I upgraded to Snow Leopard. …


  4. Error: 'unintitialized constant MySQL' with Rails 3 on Snow Leopard Mac

    I just installed Rails 3 on my iMac, which is running Snow Leopard. I’m trying to build a web hosting website/billing system/management system. I configured the app to use MySQL in /config/database.yml like so: …


  5. Installing PHPdoc for Ubuntu for use with Command Line

    I wanted to install PhpDocumentor for use on my server so that I could generate documentation from the command line. I found this article, which instructed me to somehow change the PEAR setting for data_dir. I installed PhpDocumentor in my web root and it just didn’t work and gave me a bunch of errors in the browser. …


  6. Ruby on Rails session - Access from PHP

    If you need to access a Ruby on Rails session from a PHP application running under the same domain, you can do this by splitting the string in the cookie by the ‘–’. Thanks to Frederick Cheung for pointing this out. …


  7. Obtaining Request Domain Name for Ruby on Rails

    I’m using Rails 2.3.8. To obtain the domain name for the website being requested (i.e. mysite.com, mysite.net), just reference ‘request.host’. …


  8. Changing Column Order via ActiveRecord Migration

    Is it possible to change the order of the columns in your MySQL (or other database) table using a migration? Lets see. …


  9. Rails Performance Statistics

    Again, as I search for things, I stumble onto new tools. I just found out about a tool for monitoring the performance of Java and Ruby applications called New Relic. …


  10. RailRoad Gem

    I just discovered that there is a Ruby gem which generates diagrams based on Rails models (ActiveRecord). I ran across this website a while back, but didn’t quite connect the dots. I was just reading an article on placing models into their own namespace, and I realized that the diagram it uses as an example was generated using RailRoad. …