Skip to content

Instantly share code, notes, and snippets.

View rockrep's full-sized avatar

Michael Kintzer rockrep

  • Delayed Karma, LLC
  • Seattle
View GitHub Profile
@rockrep
rockrep / postgres_partition_and_schema_dumper
Created December 6, 2012 21:38
Postgres Partitioned Table dependency issue
db/schema.rb
============
ActiveRecord::Schema.define(:version => 123) do
create_table "all2012_facts", :id => false, :force => true do |t|
t.integer "id", :default => { :expr => "nextval('facts_id_seq'::regclass)" }, :null => false
...
end
create_table "all2013_facts", :id => false, :force => true do |t|
@rockrep
rockrep / postgesql_adpater_seg_fault_dump
Created November 8, 2012 00:29
postgresql_adpater:607 seg fault dump
/$HOME/.rvm/gems/ruby-1.9.3-p194@project/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:607: [BUG] Segmentation fault
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]
-- Control frame information -----------------------------------------------
c:0044 p:---- s:0198 b:0198 l:000197 d:000197 CFUNC :values
c:0043 p:0037 s:0195 b:0195 l:000194 d:000194 METHOD /$HOME/.rvm/gems/ruby-1.9.3-p194@project/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postg
c:0042 p:0074 s:0186 b:0184 l:000161 d:000183 BLOCK /$HOME/.rvm/gems/ruby-1.9.3-p194@project/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postg
c:0041 p:0005 s:0180 b:0180 l:000170 d:000179 BLOCK /$HOME/.rvm/gems/ruby-1.9.3-p194@project/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstr
c:0040 p:0032 s:0178 b:0178 l:000177 d:000177 METHOD /$HOME/.rvm/gems/ruby-1.9.3-p194@project/gems/activesupport-3.2.8/lib/active_support/notifications/instrumen
c:0039 p:0046 s:0
@rockrep
rockrep / capistrano settings
Created April 3, 2012 23:55
gem vs bundle exec environment differences
require "bundler/capistrano"
require "rvm/capistrano"
set :rvm_ruby_string, "ruby-1.9.2-p290"
set :bundle_dir, '/usr/local/rvm/gems/ruby-1.9.2-p290'
Capistrano then executes this command:
bundle install --gemfile /home/deploy/rails_app/releases/20120403233447/Gemfile --path /usr/local/rvm/gems/ruby-1.9.2-p290 --deployment --quiet --without development test"
@rockrep
rockrep / bundle install
Created April 2, 2012 22:54
compass Rails.root is nil issue
Using rake (0.9.2.2)
Using multi_json (1.0.4)
Using activesupport (3.1.3)
Using builder (3.0.0)
Using i18n (0.6.0)
Using activemodel (3.1.3)
Using erubis (2.7.0)
Using rack (1.3.6)
Using rack-cache (1.1)
Using rack-mount (0.8.3)
app/controllers/application_controller.rb
------------
class ApplicationController < ActionController::Base
include SslRequirement
ssl_exceptions
end
spec/support/authlogic.rb
---------
require "authlogic/test_case"