My Profile Photo

rubycoloredglasses


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


  1. Example Rake Task

    Here is example rake task code which you can use and modify the next time you’re setting up new Rake tasks for a Rails app from scratch. The example includes the syntax for setting the default task, running multiple tasks in order, and a task which includes multiple arguments. This coding syntax works with Rails 3.1. …


  2. Adding a New User in Ubuntu

    Adding User


  3. Resolving issues with Namespaced Models in Rails 3.1.0

    I recently was tasked with upgrading an application from Rails 2.3.8 to Rails

    1. I choose to upgrade it to Rails 3.1, because why upgrade once and then have to do it again later.


  4. Paperclip error with non-image file

    Recently I updated to Rails 3.1 from 2.3.8 for a project I’m working on. Paperclip version 2.4.5 was working perfectly well for me locally on my Mac OS X 10.7.2 laptop, with ImageMagick version 6.7.3-1. …


  5. Issues with RVM

    I recently decided to check out BrowserCMS, to evaluate how it work and decide to use it…or RefineryCMS. I didn’t expect that BrowserCMS would require Ruby 1.9.2. I’ve been running with Ruby 1.8.6 or 1.8.7 for quite a while now without any issues. It looks like it was time that I install RVM: Ruby Version Manager. …


  6. Setting up Ubuntu for Rails App via Passenger

    These instructions apply to Ubuntu 11.04 (natty). …


  7. Formtastic use of semantic_form_remote_for

    With the update to Formtastic version 2.0.0.rc1 the ‘semantic_remote_form_for’ method was removed and support was added to ‘remote_form_for’ used like this: …


  8. Exporting Routes in Rails 3

    I’m currently upgrading a project I’m working on from Rails 2.3.8 to Rails 3.1. As part of this upgrade I need to test the entire application for issues, because we haven’t actually written any tests. …


  9. Using URL Helpers in Models or Rake Tasks

    If for some reason you need to use URL helpers which are based on the routes you’ve defined in Rails 3.1, simply add the following to the model method or rake task: …


  10. Building a Query String from a Hash with Rails 3

    I have a model has a method that generates and stores a cached link to it’s own view for use in mailers. Under Rails 2 the method which generated this link created the beginning of the URL based on the owner of the object (this is a multi-domain system I’m working on), however it required that a hash of parameters be included in the link. …