Skip to content

Instantly share code, notes, and snippets.

// lets say i have this Values table
id prop data
1 age {value: 21}
2 age {value: 40}
3 name {value: "Jane"}
4 name {value: "Joe"}
5 time {value: 12.2}
6 time {value: 21.4}
/usr/local/rvm/rubies/ruby-1.9.2-p192/lib/ruby/1.9.1/mkmf.rb:381:in `try_do':
The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
rvm update head
rvm --force install 1.9.2
gem install bundle
## in your rails app
bundle
Installing nokogiri (1.4.2) with native extensions
...
@fakingfantastic
fakingfantastic / gist:671712
Created November 10, 2010 23:16
SM not supporting Rails 3
## Gemfile
# and rake tasks are available in development mode:
group :test do
gem "sample_models"
end
## unit test
require 'test_helper'
user:
can: read a blog
author:
extends: user
can: write a blog
manager:
extends: author
can: publish a blog
# lib/javascript_helper.rb
module ActionView
module Helpers
module JavaScriptHelper
def j(data)
escape_javascript(data)
end
end
end
module RockNRole
def self.included(base)
base.send :extend, ClassMethods
end
module ClassMethods
def has_rockin_roles
send :include, InstanceMethods
end