My Profile Photo

rubycoloredglasses


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


  1. 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 …


  2. 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. …


  3. 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’. …


  4. 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. …


  5. 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. …


  6. 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. …


  7. Annotate Models

    There is a rails plugin which adds schema information for the models in comments at the top of your model definition files. It’s really useful. Check out the instructions on installing and using this plugin at: …


  8. Selenium RC, Firefox 3, and Ubuntu

    Selenium Logo


  9. Undefined method 'ref' for ActiveSupport::Dependencies:Module

    After upgrading to Snow Leopard, and trying to run ‘rake db:migrate’, I received this error once. This seems common to others which have upgraded, especially back when Snow Leopard was released in August of 2009: …


  10. Setting up Deployment for Rails using Capistrano, Apache with Passenger and Git

    I don’t have time right now to learn how to setup Capistrano. I just want a recipe that works and does the job. Here are my notes. …