Skip to content

Instantly share code, notes, and snippets.

./script/../config/../vendor/rails/railties/lib/initializer.rb:410:in `initialize_database': undefined method `configurations=' for ActiveRecord::Base:Class (NoMethodError)
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:141:in `process'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
from /Users/kyleh/oly-dev/api/config/environment.rb:4
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /Users/kyleh/oly-dev/api/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
from /Users/kyleh/oly-dev/api/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /Users/kyleh/oly-dev/api/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
(ns clojoku
(:use [clojure.contrib.seq-utils :only (indexed)])
(:use [clojure.contrib.str-utils :only (str-join)])
(:use [clojure.set :only (union)]))
(defstruct board :cells)
(defn interpose-n [n sep coll]
"Returns a list with sep inserted after every n entries in coll"
(mapcat (fn [[idx x]]
(defun reverse-alist (alist)
(mapcar
'(lambda (cell) ((cdr cell) . (car cell)))
alist))
(reverse-alist '(("a" . "b")
("c" . "d")))
; => '(("b" . "a")
; ("c" . "d"))
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Hi</title>
</head>
<body>
<ul>
<li>one</li>
<li>two</li>
@pd
pd / gist:8410
Created September 2, 2008 13:57
(gdb) bt
#0 0x28200de3 in poll () from /lib/libc.so.6
#1 0x2816c532 in poll () from /lib/libpthread.so.2
#2 0x28670861 in pqSocketPoll (sock=4, forRead=1, forWrite=0, end_time=-1) at fe-misc.c:1037
#3 0x28670723 in pqSocketCheck (conn=0x8d36c00, forRead=1, forWrite=0, end_time=-1) at fe-misc.c:979
#4 0x286705d8 in pqWaitTimed (forRead=1, forWrite=0, conn=0x8d36c00, finish_time=-1) at fe-misc.c:911
#5 0x286705ab in pqWait (forRead=1, forWrite=0, conn=0x8d36c00) at fe-misc.c:894
#6 0x2866d001 in PQgetResult (conn=0x8d36c00) at fe-exec.c:1223
#7 0x2866d4c5 in PQexecFinish (conn=0x8d36c00) at fe-exec.c:1452
#8 0x2866d1eb in PQexec (conn=0x8d36c00, query=0x80f5300 "SELECT * FROM \"ticket_changes\" ORDER BY ticket_changes.created_at DESC LIMIT 25") at fe-exec.c:1293
class Foo; end
describe 'foo' do
it "should not be borked" do
Foo.should_receive('baz').with('huh', :include => [:a, :b], :conditions => {:c => :d})
Foo.baz('huh', {:include => [:a, :b]}, :conditions => {:c => :d})
end
end
@pd
pd / gistie
Created July 22, 2008 14:39 — forked from anonymous/gistie
#!/usr/bin/env ruby
# Made by Pieter de Bie <frimmirf@gmail.com>
# Based on a "Pastie" task by someone
require "tempfile"
GIST_URL = 'http://gist.github.com/gists'
if ARGV.include? "-p"
text = `pbpaste`