Category Archives: Ruby

Spork, Rails 3, and rspec-rails play nice together

Getting the following error when starting up spork?
undefined method `specifications’ for “/Users/{your-name-here}/.rvm/gems/ruby-1.9.2-p180″:String (NoMethodError)
Add the following to your Gemfile under test and make fix!
gem ’spork’, ‘~> 0.9.0rc7′

A Sinatra before only filter

In a Sinatra application you can use the ‘before’ filter to run something before every each event.

before do
puts “I will run all the time…”
end

Here’s a module that will allow you to run code only before certain routes:

module Sinatra

module BeforeOnlyFilter
def before_only(routes, &block)
before [...]

Automate font compiling for Flex with Ruby

I came up with this solution when I had to compile over 100 fonts into SWF files for a recent project. Doing this by hand would have been madness so I wrote a ruby script and a shell script to automate the process.
Step 1: Setup
The directory structure I used was as follows.
convert.rb (the ruby script)
compile.sh [...]

Display Rails associations in a Flex DataGridColumn

Frameworks like Ruby on Rails and CakePHP make it easy to set up model associations with belongs_to, has_many, and the ever popular has_and_belongs_to_many. However, getting those associations to show up in a Flex DataGridColumn’s dataField isn’t immediately obvious, you’d assume you could just do parent.child or child.parent but that just gives a blank column. After [...]

Run your web applications on Google’s infrastructure

Google releases App Engine. It’s Python only for now, but there are rumors more languages (Ruby!) will soon be available.
Here’s a video intro. And Django runs out of the box (in the box?) – well some parts are missing like no relational db – still you can’t beat the one line deployment!

Docs! Running Django on [...]

PureMVC for Ruby

The PureMVC framework is considered one of the best for Flash/Flex development (definitely the best documented), I hadn’t checked out the site in a while (which has undergone an overhaul and is much improved!) and since my last visit PureMVC is now available for not only AS2 and AS3 but C#, ColdFusion, Java, Perl, PHP, [...]

Build Flash with Ruby

Via Flex on Rails…
Using HotRuby it is possible to use straight Ruby to build a Flash app.

Run Ruby code in the Flash Player?

Or even better write Flash/Flex Rich Internet Applications with Ruby? Ted Patrick says it may soon be possible.
When Microsoft released Silverlight the one feature that got a lot of people excited was that you could use the language you were most familiar with to build a RIA. Apparently Adobe has an internal project which allows [...]

Flex, Flash, and Ruby hourly billing rates

HotGigs has a feature where they collect and aggregate the hourly bill rates of the consultants on their site. Here are the average hourly bill rates for Flex, Flash, and Ruby, surprisingly they have sub-categories for Flash all the way down to Flash Remoting but there’s just one category for Ruby with no Rails sub-category.
For [...]

Regular expressions make my head hurt

A site to dull the pain Rubular. Via Ruby Inside.