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 3. I choose to upgrade it to Rails 3.1, because why upgrade once and then have to do it again later. After upgrading and testing many points of the system locally, I was ready to push the upgraded application to the production…

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. We had just launched the upgraded Rails 3.1 application to our production server, which went smoothly, but upon my checklist of…

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

Issues with Bluetooth in OS X Lion after Upgrade

I recently upgraded from OS X Lion (10.7.1) from Snow Leopard so that I could be up-to-date and benefit from any good features. Truthfully I liked the old Expose and Spaces better than this new Mission Control interface for virtual desktops…but oh well it will do. After upgrading to Lion the one thing that has…

Redirect_to not working

I was just working on a Ruby on Rails controller method that receives information from the previous form via HTTP POST. I coded it so that if certain form variables weren’t present it would set a flash message and redirect to the form page. I tried and tried and still the redirect wasn’t working. I…

Advanced Use of Will_Paginate

I’m building an index of contacts, displayed with paginated links provided by will_paginate. The wiki for this plugin advises you on how to do setup your controller method, and what to put in the view to obtain a simple set of links, such as: # /app/controllers/contact_controller.rb def index @contacts = Contact.paginate :page => params[:page], :per_page…

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. I’m working on a CSV import option right now, using this tutorial to help me get a head start on how to break the contents of the file up into rows…

Netflix is Throwing It All Away

I recently watched the video apology from Netflix Co-Founder and CEO, Reed Hastings. I really expected to gain some insight on why Netflix raised their pricing which would help me to understand why it was necessary, something along the lines of  it being necessary for negotiating better content with content providers. As it turns out, it…

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

Colorbox Width Issue in Internet Explorer 7

I’m currently working on a web application that uses the Colorbox plugin for jQuery. The popup boxes created using this plugin worked perfectly fine in Firefox and Google Chrome (as is typically the case), as well as Internet Explorer 8 and 9…but for some reason the width of the boxes were so wide that they…