View gist:6533964
HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install sphinx --mysql 2>&1
Error: undefined method `head' for #<SoftwareSpec:0x11030f910>
Please report this bug:
https://github.com/mxcl/homebrew/wiki/troubleshooting
/usr/local/Library/Formula/sphinx.rb:24
/usr/local/Library/Homebrew/formula.rb:722:in `instance_eval'
/usr/local/Library/Homebrew/formula.rb:722:in `resource'
/usr/local/Library/Formula/sphinx.rb:23
/usr/local/Library/Homebrew/formulary.rb:40:in `require'
View gist:5661189
def self.symbolize_keys(hash)
hash.inject({}){|result, (key, value)|
new_key = case key
when String then key.to_sym
else key
end
new_value = case value
when Hash then symbolize_keys(value)
when Array then value.map{ |v| v.is_a?(Hash) ? symbolize_keys(v) : v }
else value
View gist:3826076
Delayed::Worker.backend = :active_record
Delayed::Worker.max_attempts = 1
module Delayed
class Worker
# Do num jobs and return stats on success/failure.
# Exit early if interrupted.
View gist:3772531
:plain
if xyz == 1
do_this y
do_that x
View gist:3772529
if xyz == 1
do_this y
do_that x
View gist:3772514
module Coffee
module Rails
class HamlTemplateHandler
def self.haml_handler
@@haml_handler ||= ActionView::Template.registered_template_handler(:haml)
end
def self.call(template)
compiled_source = haml_handler.call(template)
"CoffeeScript.compile(begin;#{compiled_source};end)"
View gist:1447883
ActiveRecord::StatementInvalid: PGError: ERROR: column "description" of relation "job_categories" does not exist
LINE 1: UPDATE "job_categories" SET "description" = 'buuuuh', "updat...
^
: UPDATE "job_categories" SET "description" = 'buuuuh', "updated_at" = '2011-12-08 18:09:54.047697' WHERE "job_categories"."id" = 2
from /Users/nico/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:1003:in `async_exec'
from /Users/nico/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:1003:in `exec_no_cache'
from /Users/nico/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:602:in `block in exec_delete'
from /Users/nico/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:244:in `block in log'
from /Users/nico/.rvm/gems/ruby-1.9.2-p290/gems/activesuppor
View gist:1437306
de-CH:
routes:
advertise: inserieren
userhome: mein_profil
contact: kontakt
business_contact: unternehmen
View gist:1435467
translated_named_route 'advertise', 'site#advertise'
translated_named_route 'userhome', 'users#show'
translated_named_route 'contact', 'contact#index'
translated_named_route 'business_contact', 'contact#business_enquiry'
View gist:1435458
# ---------------------------------------
# Helpers for creating translated routes
# ---------------------------------------
module RouteTranslation
BASE_LOCALES = [:de, :'de-CH']
URL_PREFIX_LOCALES = [:'fr-CH']
LOCALES = [BASE_LOCALES, URL_PREFIX_LOCALES].flatten