Tuesday, July 09, 2013

Sublime Text 2 Configuration

After many months of trying it, I am now a official Sublime Text 2 convert.  I love the flexibility of this editor and the fact that it is available on most of the platforms I use (Mac, Windows, Linux).  Maybe they could make an iOS version in the future.  I keep a Google Doc that describes how I configure Sublime Text 2 which is now shared:  My Sublime Text Configuration  Also I've have a gist that shows the keyboard shortcuts:  https://gist.github.com/4686573

Thursday, November 01, 2012

Yeoman on Windows (via Git Bash)

See Yeoman.io

If you try to install yeoman on windows (via Git Bash), it says that windows is not supported. But don't worry, all you need to do is install yeoman and its dependencies manually.

Software to install:

You will need to add this software to your GIT BASH's $PATH so that yeoman can run it from the command-line.

IMPORTANT: ONLY RUN YEOMAN COMMANDS FROM THE GIT BASH COMMAND LINE! Never run yeoman from the windows cmd prompt. Yeoman will use unix style file paths. If you run from windows cmd, yeoman will put files in the wrong folders. You have been warned!

Tuesday, October 25, 2011

NBuilder with Prototypes

I've created an extension method for NBuilder's SingleObjectBuilder. This allows setting property values based on a prototype. A typical usage would supply an anonymous object as the prototype...

            var prototypeStyle = Builder<Subject>
Id = 11,
Name = "prototypeStyle",
ParentName = "Dad"

I like this style because the property name/value pairs are easier to see.

You can find an implementation at http://code.google.com/p/nbuilder/issues/detail?id=78

Thursday, December 16, 2010

Thursday, October 14, 2010

SpecFlow is Cucumber for .Net

I'm a big fan of Cucumber, a testing tool in Ruby. Cucumber lets you write tests in a language that business people can read (Gherkin). This really helps when working out requirements and edge cases.

These days I am working .Net for my day job. So I was happy to find SpecFlow - Pragmatic BDD for .Net. SpecFlow implements Cucumber for .Net. I've tried it a couple of times and found it works really well. One more tool for my tool box!

Saturday, January 23, 2010

IronRuby 1.0 RC1 on Rails

Tonight I put 20,000 Leagues Under the Sea (1916 silent film) in the DVD player and started playing with IronRuby while the movie ran. It didn't take long for me to get engrossed in IronRuby and now I'll need to watch the movie some other time. No loss, the sound track for the movie makes good enough background music.

I decided to try the Rails tutorial on IronRuby's site. I was pleasently surprised to find instructions for ironruby_sqlserver gem which provides ActiveRecord support. The tutorial uses SQL Express, but I had no trouble using SQL 2008 Developer instead.

Everything in the tutorial worked great. After entering a few commands and creating the Post scaffold, I had a working Rails site (2.3.5) running on WEBrick with IronRuby!

The only problem I ran into was the last step of the tutorial which runs script/console. When I ran script console, as the tutorial specified (ir script\console --irb="c:\ironruby\bin\iirb.bat") I got the following error...

IronRuby.Libraries:0:in `GetExecutable': c:\ironruby\bin\iirb.bat -r irb/comple
tion -r "C:/Users/Greg/Documents/dev/ironruby/ironrubyonrails/config/environment
" -r console_app -r console_with_helpers --simple-prompt (Errno::ENOENT)
from IronRuby.Libraries:0:in `CreateProcess'
from :0:in `exec'
from C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/commands/console.rb:47

To get around the error, I found I could run the commandline that line 47 was attempting run through Ruby's exec:

iirb.bat -r irb/completion -r "config/environment" -r console_app -r console_with_helpers --simple-prompt

This launched a good iirb console with access to the Rails environment!

Overall I was very pleased with IronRuby and I'll have to spend more time with it.

Monday, October 12, 2009

TechMixer University 2009

October 13th, 2009: TechMixer University is a one-day conference in Birmingham AL. This year it had ~500 people attending. I gave the "Getting Started with Ruby" presentation to ~40 people. Almost everyone in the meeting had never seen Ruby before, so this presentation was perfect for them.

This presentation is an update from last year's presentation. The differences are: 1) shortened the Ruby language syntax details 2) Changed the Bonus Slides to "Ruby in Action" and added Cucumber, Sinatra, Rake to this section.

Thanks to all that attended. If anyone needs help getting started, please post questions to the Rubyham message board.