Blog Archives

Getting started with Heroku and Rails 3.1

Pre-requesites: RVM on your local machine with Ruby 1.9.2 Heroku account Switch to the 1.9.2 version of Ruby, install the rails and heroku gems, create your rails 3.1 application Terminal $ rvm 1.9.2 $ gem install rails $ gem install heroku $ rails new tickets $ cd tickets Add in the nifty-generators gem: /Gemfile gem "nifty-generators", [...]

Passenger (mod_rails) updates

When updating Passenger: sudo gem update passenger passenger-install-apache2-module The second command is important as it compiles the apache 2 module (caught me out for a whiles, hence this post). Ensure that the module is properly added to your config file. (e.g. /etc/apache2/apache2.conf) by confirming its pointing to the new directory for the updated version of [...]

Git repositories with Slicehost

No doubt I am really happy with my Slicehost VPS, it has been so hassle free!  The best part about Slicehost is all the amazing articles they provide to help you get going with your slice. I’ve setup my slice to host my private git repositories, particularly since I wanted to use them with Rails [...]

Making your Rails app work on Java

So you’ve written a Rails app and you want to show it off to your boss at work because you know that it will impress them. Problem is that your company only uses Java and won’t consider it for their production environment if it can’t be deployed under a JVM. Let’s go: Install JRuby http://jruby.org [...]

Setting up scheduled jobs with Rails

I’ve seen lots of different approaches to scheduling jobs with Rails, including a great run down by Ryan Bates’ Rails Casts Episode 129, however the most elegant solution I’ve seen so far is what was outlined in Episode 164 using the cool Whenever gem and good ol’ Cron. Within a couple of hours I had [...]

Ok, ok, I get it, jQuery is cool!

I’d been hearing about jQuery for quite a whiles now but resisted the temptation to dive in. The Rails community in particular is quite abuzz with it and I’d heard the creator of it interviewed on Geoffrey Grosenbach’s Ruby on Rails Podcast. Still I resisted, surely prototype and scriptaculous were the way to go, after [...]

Dependency injection for Rails

I’d been looking around for how to do Dependency Injection (Inversion of Control) in my Rails App. I don’t need anything particularly fancy, just the ability for classes (controllers in particular) to have different service implementations injected into them depending on the environment that they’re in. Something which I take for granted in the Java [...]