First Step on Ruby Metaprogramming
Related cards:
Postgres: DISTINCT ON lets you select only one record per ordered attribute(s) for each group
-
To retrieve only unique combinations of the selected attributes: You can omit rows, where all selected columns are equal with the
DISTINCT
statement. - To retrieve the group wise maximum of certain columns: You can keep only one record fo...
Lightning Talk: Coverage based Test Case Prioritization in Ruby on Rails
For my computer science bachelor's thesis I programmed and evaluated a CLI Test Case Prioritization (TCP) tool for makandra. It has been written as a Ruby Gem and was tested and evaluated against one Ruby on Rails project....
Fix [RubyODBC]Cannot allocate SQLHENV when connecting to MSSQL 2005 with Ruby 1.8.7. on Ubuntu 10.10
I followed this nice guide Connecting to MSSQL with Ruby on Ubuntu - lambie.org until I ran in the following errors:
irb(main):001:0> require "dbi"; ...
Upgrade from Ruby 1.8.7 to Ruby 1.9.2 on Ubuntu
Note that you cannot currently use Ruby 1.9.2 with Rails 2 applications that use RSpec, so don't upgrade if that is your setup. The rspec-rails gem has a fatal bug that was only fixed for rspe...
Ruby, Ruby on Rails, and _why: The disappearance of one of the world’s most beloved computer programmers
Nice article to educate your non-geek girlfriend/boyfriend about the joys of programming.
Ruby on Rails Tutorial: Learn Rails by Example | by Michael Hartl
A thorough introduction to web development with Ruby on Rails
Ruby: Flatten arrays by only one level
Array#flatten
by default flattens an array recursively. To only flatten the array for e.g. one level, it takes an optional argument.
# Flattens the array recursively
>> [1, [2, [3]]].flatten
...
How to make changes to a Ruby gem (as a Rails developer)
At makandra, we've built a few gems over the years. Some of these are quite popular: spreewald (> 1M downloads), active_type (> 1M downloads), and geordi (> 200k downloads)
Developing a Ruby gem is different from developing Rails applications, w...
Cucumber: Calling multiple steps from a step definition
When refactoring a sequence of steps to a new, more descriptive step, you can use the steps
method and Ruby's %-notation like this:
Given 'I have an article i...
Install RubyGems on Ubuntu/Debian
First of all: You could just use RVM which would make the pain go away. If for some reason you can't, proceed.
Do not use rubygems from the apt repository.
- Get the latest [RubyGems](http://rubygems.org/page...