When you’re developing a Ruby on Rails application on Windows, you have to learn to deal with a lot of minor issues. I used Mercurial (Hg) initially as my source control. However when time came to deploy my application, I found out that Git would have been a much better choice. Both Heroku and Engine [...]
Archive for the ‘Uncategorized’ Category
3 Nov
Paginating multiple models using will_paginate on the same page
The will_paginate plugin makes pagination for your models in Ruby on Rails ridiculously simple. However sometimes you’ll find yourself wanting to paginate over two or more models on a single page. For instance, you might want to display a list of users and administrators on a single page along with a pager for each model [...]
20 Oct
Testing file uploads in Ruby on Rails with RSpec
While working on my latest project,I wanted to drive the design of my file upload code using Behavior Driven Development using Webrat and RSpec. For most people, I would recommend using a plugin like Paperclip rather than reinvent the wheel, but if you’re interested in seeing how to use RSpec to drive the design of [...]
12 Sep
Sample nginx (with Phusion Passenger) configuration file to enable SSL
Read my earlier post if you want Phusion Passenger to compile nginx with SSL support. If your nginx server already supports SSL, read on.
Phusion Passenger fills up most of the configuration in nginx.conf for you with a nice set of defaults. You just have to do a little more work if you want to modify [...]
12 Sep
Getting Phusion Passenger to install nginx with SSL support
Phusion Passenger or mod_rails has taken away almost all the pain once associated with deploying Ruby on Rails applications. Phusion Passenger recently added support for the nginx web server. My application required SSL support, but Phusion Passenger does not by default compile nginx with SSL support. I’m new to System Administration and even newer to [...]