Zero to Rails in 2 minutes

| | Comments (10)

Add one part OmniGraffle 4, one part applescript, one part ruby, and a dash of animosity towards SQL and you get the following lovely lovely dish:

ZeroToRailsIn2Min.png

From absolutely nothing to a running rails app in under two minutes. SQL not required.

(if you have problems with the url, try the original instead... just be nice to my server please)

10 Comments

Oh man that's sweet, is the script for OmniGraffle 4 to SQL available?

I also am interested in the AppleScript to convert OmniGraffle ERDs into SQL text. That seems pretty useful, since I already have OmniGraffle, and have yet to find an even adequate ERD diagramming tool for OS X.

So, Ryan, can you hook us up with the necessary stencil and AppleScript?

Yes... release is coming soon.

Ryan,

Which graffle do you use? I haven't found one in de standard installation of OMGraffle 4 pro..

Which graffle do I use? I don't think I understand the question.

I just got the script code from the Rails site but I am curious which template you are using in OG4?

And for the benefit of others here is the script you posted on the link to this post on the rails site:

#!/usr/bin/perl #

$/ = undef;

open OUT , ”>schema.sql”;

print OUT “BEGIN TRANSACTION ;\n”; while (<>) { while (/(create (table|view).*?;)/sg) { my $x = $1; $x =~ s/\//g; print OUT ”$x\n”; } }

print OUT “COMMIT;\n”; close OUT ;

Ryan, what is in the quickrails.rb script you used in the video?

Sam,: no, that isn't the script I posted. 1) That is perl. 2) That doesn't do a topological sort or ANYTHING to understand your relations.

Kelsey, magic... magic is in the ruby script. Duh.

That's cool. I'd be interested in the diagram-sql script.

What omnigraffle object did you use for the tables?

You can get [a totally different] SQL script here:

[censored--if you didn't try to pawn it off with false advertising, it'd be welcome here, but you had to be a schmuck... tsk tsk]

Cheers!

Leave a comment