I’ve been doing a lot of data clean up recently and writing quick Ruby tools that parse array’s of data hashes to produce SQL statements that can be...
13 articles tagged 'ruby'
Connect ActiveRecord via SSH Tunnel
Feb 17, 2014
Wow… its been a while since I’ve written anything on here. Christmas was time out with the family and then the year started with a big project, but...
Sharing data with CakePHP & Rails
Dec 12, 2013
A while ago I was involved in a project that wanted to convert a legacy CakePHP (v1.3) app into a Rails app. One of the problems we had to solve was...
ZSH, Vim, Ruby and rbenv
Nov 1, 2013
Over the last year I’ve gradually pushed myself towards Vim and can now say I’m a complete convert. I generally live inside Vim as much as possible...
This weekend I attended Ruby Manor, a community driven conference, and while it is targeted at the Ruby community, the chosen talks covered an eclectic...
I write most, if not all, of my client side code in Coffeescript now. While thats fine in Rails, which has a great asset management system, in other...
Ensure latest commits are pushed before deploy
Feb 27, 2013
This is a task I add to my capistrano recipes to ensure that the branch being deployed is always pushed to the remote prior to deploy
task :push do
Use current Git branch for deploy in Capistrano
Feb 25, 2013
I use Git Flow and Capistrano Multistage to manage deployment of my web apps, which means I can be deploying lots of different branches to our test...
Customising IRB
Feb 19, 2013
I only just came across this the other day, so other people using Ruby, at least those new to it, may not know this either.
What’s irb? (Just in case...
Formatting Dates in Ruby
Feb 17, 2013
Every time I come to format a date as a string in Ruby I spend 10 minutes looking up the tokens to get the formatting right. They just don’t seem to...
Quickly Generate Long Random Strings in Rails
Feb 12, 2013
One of the things some people don’t know to do when they grab an open source Ruby on Rails app from Github (or elsewhere) is to change the secret token...
Simple Sitemap.xml in Rails 3.1
Feb 4, 2013
There are all sorts of ways you could set up a sitemap for your rails 3.1 application.
If you want to add urls dynamically, from blog posts for example...
Recreate All Your Records
Jan 18, 2013
This may seem like a pretty unlikely situation, but occasionally you may need to recreate all records in a particular table, and you want it done via...