Aston J

Learning Vim

Posted on: July 3rd, 2012 by AstonJ 1 Comment

If you’re interested in learning Vim you’re in luck – because there are some great resources out there. In this post I’m going to document the ones I’ve been using, in a step-by-step kinda way – hopefully making it easy to follow for anyone else keen on learning. By the end of it, you should (hopefully) no longer be a novice ;)

Vim for Ruby on Rails (and a sexy theme!)

Posted on: June 28th, 2012 by AstonJ 56 Comments

This post started off as a small guide mainly for my own reference, but it’s grown into a good overview of why Vim is so great for Rails development – if you’re unconvinced, just read through the killer commands listed below… you’ll soon see how Vim could make life a lot easier for you – and I’m only scratching the surface here!

How to get Capistrano to ignore upload directories (Carrierwave)

Posted on: June 23rd, 2012 by AstonJ 7 Comments

As you probably know, Capistrano creates a fresh directory for your app every time you deploy a new version. So if you want some directories (or files) to be carried through to each version, such as files uploaded by users, then we just need to tell Capistrano that they are shared – and to use the /shared directory for these files instead. Which is done by creating symbolic links. Here’s how.

Add this to your deploy.rb file:

Intro to Git – 5 mins to see why it’s awesome

Posted on: June 9th, 2012 by AstonJ No Comments

This is more a handy reference for myself, but it also acts as a very quick intro to why git is awesome and well worth using. The main difference here is I remind you what the state of your working directory is as you make changes (as this was what confused me previously – as I wasn’t quite sure what was going on). I assume you’ve installed git already – and know what it is.

Rails Migrations – how I’m using them

Posted on: April 7th, 2012 by AstonJ 3 Comments

I’m fairly certain I am using them a little unconventionally, and just wondered – am I alone? Before going on I will add that I’m able to use them this way because a) the app is still in development, and b) I am the only developer.

Stop knocking Rails – it’s easy to learn!

Posted on: April 5th, 2012 by AstonJ 9 Comments

It seems fashionable to knock Rails as beginner unfriendly these days, but I think that’s wholly unfair – because I found Rails *much* easier to learn, and a better option for web development than most (if not all) of the other ‘options’ (some I tried, some I researched and rejected). Easier because Rails is written in a more natural, easier to understand language, and better because Rails teaches you a tremendous amount of best practises that would otherwise take you a lifetime to learn. It also saves you from wasting weeks or months agonising over which technologies to use or methodologies to follow – that in itself is priceless, and that is a large part of why it is so appealing to (and a good bet for) us n00bs.

Almost anyone can learn almost anything, if you just go about it the right way. Let’s explore that here from the perspective of learning Rails.

First up.

What is a beginner?

A person just starting to learn a skill or take part in an activity.


Rails mass assignment security

Posted on: March 6th, 2012 by AstonJ 5 Comments

While Rails does a lot to secure your app, some things it leaves to you (as one size doesn’t fit all) and mass assignment security (MAS) is one such example. Rails does of course, make it easy for you to bolt things up, here’s how.

When will you need MAS?

Whenever you are accepting data from users, such as from a form via a params[:hash] and using update_attributes (and family) eg:

Advanced Ruby & Rails books

Posted on: December 3rd, 2011 by AstonJ 1 Comment

This is the sequel to my Best way to learn Ruby & Rails post, if you’re new (or fairly new) to Ruby or Rails, read that first. In this post we look at books that help to get you from intermediate level to pro, although you’ll have to bear with me as this is currently my own journey too – and so this post will probably get edited, re-edited often (mainly to change the order of books).

How to install MySQL on Lion (Mac OS X )

Posted on: December 2nd, 2011 by AstonJ 16 Comments

If you want to install MySQL on Lion it’s pretty easy, just head on over and download the DMG from (for lion you’ll need the 64bit DMG Archive).

Ruby Koans Answers

Posted on: November 30th, 2011 by AstonJ 3 Comments

Looking for the answers to Ruby Koans? Well you’re not going to get them here! But what I will do is show you how to get them and who to ask if you get stuck.