Category Archives: Software

Scaling a Rails Application – Thinking About the Full Stack

I found a great presentation about scaling web applications that I wanted to share with the world. Enjoy! Scaling a Rails Application from the Bottom Up If you enjoyed this post, make sure you subscribe to my RSS feed!
Posted in Software | Tagged , , , | Comments closed

Getting FancyUpload to work with Rails

FancyUpload is a slick looking file uploader with a progress bar. However, it’s not completely obvious how to get it working with your Rails application. I searched long and hard and found 2 pretty good examples here and here. The problem is that the former only works with Amazon S3, and the [...]
Posted in Software | Tagged , , , , , | Comments closed

How to change a UIBarButtonItem in the iphone toolbar

I recently needed to add a custom button to the iPhone toolbar but it needed to have state. Specifically, I needed the ability to enable and disable it based on some conditions. I implemented this using two images for the button – one for enabled and one for disabled. First, add the button to the [...]
Posted in Software | Tagged , , | Comments closed

B’more on Rails synopsis – April 2010

B’more on Rails is a community of Baltimore folks who use the Ruby programming language and the Ruby on Rails application framework. Check out our MeetUp page. Below is a brief synopsis from our April 2010 meetup. You can also download the slides here. Bundler is great for gem management. Among other [...]
Also posted in Bmore On Rails Review | Tagged , , , , , , , , , , , | Comments closed

Install MySQL on Mac OS X 10.6 and add StartupItem

Installing MySQL on Mac OS X 10.6 took a bit of digging around. Here is a consolidated tutorial. I am leaving out sudo commands for convenience. Use them where you don’t have permission. # create the directory where you will keep your MySQL binary distribution mkdir ~/src cd ~/src   # download mysql binary distribution from # [...]
Posted in Software | Tagged , , , | Comments closed

Recovering off screen windows in Mac OS X

I constantly lose windows on OS X. I think it’s because sometimes I am connected to an external monitor so OS X gets confused when I am not. I found a great solution online that I would like to re-post here so that I never have to look for it again and I [...]
Also posted in Random | Comments closed

Converting Table Data to YAML for Testing in Ruby on Rails

One of my clients has a huge application with no test suite. I am helping the company migrate to Rails 2.3 as well as remove some bottlenecks from their code. I needed to convert around 10 look-up tables to YAML’s so that I could load the data as fixtures and test the application [...]
Posted in Software | Tagged , , , , , , , | Comments closed

Getting jQuery, Rails, and Authenticity Tokens to play nice

For anyone that uses the jQuery AJAX library to send POST requests to their Rails application, you have probably found that the built in Rails CSRF protection does not play nice with your jQuery POST requests. By the way, if you don’t know what CSRF is, check out my Ruby on Rails security presentation. [...]
Posted in Software | Tagged , , , , | Comments closed

Ruby on Rails – Skipping validations based on where object is created

I ran into an issue today where I wanted to skip validations based on where an object was created. To be more specific, I wanted to validate strictly if a “venue” was created through my web interface but I want to skip validations when importing venues. The reasoning is pretty simple, I want [...]
Posted in Software | Tagged , , , , | Comments closed

Back links for your Ruby on Rails application

Here is a nice little helper I wrote to display back links: def back_link link_to "« Go Back", request.env["HTTP_REFERER"].blank? ? "/" : request.env["HTTP_REFERER"] end If you just use the HTTP_REFERER without checking if it’s blank, weird things can happen if someone lands on your page from an email, for example. If you enjoyed this post, make [...]
Posted in Software | Tagged , , | Comments closed