My Profile Photo

rubycoloredglasses


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


  1. Foreign Key References when Generating Model

    I forget the proper syntax for a model generation command that includes a reference to another models id (foreign key). …


  2. Edit Devise User without Password

    I recently setup a custom controller to edit/update my Admin accounts, which are authenticated using Plataformatec’s Devise gem. …


  3. Factory Girl Not Generating Factories with Scaffold

    I just started a new Rails 3.2 project, and to ensure that the proper test files are generated using Shoulda or Factory_Girl, I’ve installed those gems and configured the application to generate the test files using these gems. …


  4. Ruby Comparison Operator =~

    I saw this in some code recently, wasn’t sure what it did. …


  5. Invalid Gemspec Error Regarding Invalid Date Format

    I installed factory_girl (2.6.0) for a project I am working on recently, and all of a sudden I started getting errors with RubyGems when I would try to run a rake task, such as: …


  6. Deleting Git Branches in Remote Repository

    I had recently used a branch to handle all the modifications I was making to a system for a Rails 3.1 upgrade from Rails 2.4.3. After I merged my changes back into the master branch, I deleted the ‘rails3’ branch locally, but it still remained on the remote server. …


  7. Rails 3 on WHM / cPanel VPS Server

    cPanel is working towards making Rails 3 applications run natively with Passenger, setup via the cPanel interface. I’m not really sure if this will be ideal, as most organizations deploy their apps to the server using Capistrano, not uploading via FTP or something. …


  8. Configuring Rails 3.1.3 under Sub-URI

    In setting up a new Rails app recently I was told that it needed to be served under the sub-URI of ‘/info’. I hadn’t done this before with a Rails app, and I expected that it could be tricky. …


  9. Custom Rake Tasks Not Loading

    I recently went to create a new Rake task under /lib/tasks in a Rails application I’m working on. I didn’t understand why the rake tasks weren’t showing when I would run rake -T from the command line. …


  10. Troubleshooting ActiveResource Requests

    I’m currently working on an app which integrates with the HighRise API using the Highrise Ruby wrapper gem. The classes defined by the gem rely on ActiveResource, the Ruby library included with Rails for interfacing with RESTful resources like the HighRise API. …