Skip to content

Instantly share code, notes, and snippets.

@robbkidd
robbkidd / .rubinius_last_error
Created May 18, 2011 20:57
Rubinus crash during 'bundle install' of pr_geohash
rubinius 1.2.4dev installed via RVM v1.6.5 on Ubuntu 10.10
Installing pr_geohash (1.0.0) *** glibc detected *** /home/robb/.rvm/rubies/rbx-head/bin/rbx: free(): invalid next size (fast): 0x0b617120 ***
Rubinius Crash Report #rbxcrashreport
Error: signal SIGABRT
[[Backtrace]]
/home/robb/.rvm/rubies/rbx-head/bin/rbx[0x80acf2c]
# Packaging ruby with fpm is a bit meta
# You need ruby install to use fpm
# I used an RVM install on a VM install fpm in a packaging gemset
# Install EPEL if you don't have it already
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
# Install deps for ruby build
yum install rpm-build readline-devel.x86_64 libffi-devel.x86_64 libyaml-devel.x86_64 zlib-devel.x86_64 openssl-devel.x86_64
@robbkidd
robbkidd / blargle.rb
Created December 11, 2014 01:04
RSpec in Your Ruby
require 'rspec'
class HiThere
def blarg
"hi there"
end
end
describe HiThere do
it 'says hi' do
@robbkidd
robbkidd / gist:12f4ddfc8007529a9b84
Created December 10, 2014 18:02
Ugly Way to Get Chef to Install an RPM from a URL
where_the_cool_packages_at = {}
where_the_cool_packages_at << { :package => "awesomeness.rpm", # this will be used as the downloaded filename
:url => "https://awesomesauce.example.com/download/this/awesomeness.rpm" # where to get it
}
where_the_cool_packages_at << { :package => "otherthing.rpm",
:url => "https://someotherthing.example.com/download/the/otherthing.rpm"
}
where_the_cool_packages_at.each do |package, url|
# download the thing from `url` and put it in Chef's file cache