Tuesday, 14 October 2008

BDD with Ruby applications using Netbeans IDE

Being from a .net background, I am used to working with IDEs. I tried for a bit without, but didn't get into it, it's alright for the Textmate users but I am on a Windows system at the moment. Building apps using Notepad or SciTE gets a bit laborious, so I downloaded Netbeans.

Rails appswith Netbeans are quite straight forward, but I've spent ages trying to get Cucumber working from Netbeans and have just solved the problem.

Anyway, this is how to get things working from inside the Netbeans IDE:

Cucumber

First of all install the gem
gem install cucumber
Add this to the Rakefile in the project root
require 'rubygems'
require 'cucumber/rake/task'

Cucumber::Rake::Task.new

Now the project context menu will have "features" in the "Run rake task" menu item.

RSpec

require 'spec/rake/spectask'
Spec::Rake::SpecTask.new
Then create spec_helper.rb with
$:.unshift(File.dirname(__FILE__) + '/../lib/')
and require
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
in each of your spec files

Autotest

Still haven't got Autotest to work, but will updated this post when I finally do.

Monday, 13 October 2008

Handy Ruby resources

This is a list of resources I find useful whilst learning Ruby.
I will update it as I find new ones.

Ritchie Hawtins 2008 DJ Setup

Ritche Hawtin goes into the details of hime current DJ setup.

Makes me want to spend lots of money


Richie Hawtin 2008 DJ Setup from Dean Koch on Vimeo.

Another very cool web page m-nus

Friday, 10 October 2008

How I got here

I have started this blog as a repository for the information I gather of interest and use as a I go about my everyday life. I imagine it will mainly contain references to either brewing, programming or the wonderful world of rearing little humans.

At the moment I am spending most of my free time, and there isn't much of it, learning how to program using Ruby. I started about 2 months ago and I think I have a basic understanding of the language, but have a long way to go. However, I think I might, even at this stage, have something to give to the community, or at least something to record that will help me.

BTW. Ruby Forum is a really good place to get help.

I come to the world of Ruby from the world of .net, and I think it was due to the MVC Storefront series that Rob Connery made. I think he mentioned something about Ruby on Rails at the beginning of the series and then went about creating a ecommerce site using TDD (Test Driven Development) with .net3.5. I had never heard of TDD up till this point and thought "this is what I should really, really be doing". I followed the series and built my own version of the storefront, but TDD seamed to be a bit of a pain in the arse in .net, so I thought I would take a look at Ruby, or specifically Ruby on Rails. I think I'm a bit obsessed with Ruby now, or so my girlfriend says.