Skip to content

Instantly share code, notes, and snippets.

View aselder's full-sized avatar

Andrew Selder aselder

View GitHub Profile
@aselder
aselder / gist:1163027
Created August 22, 2011 17:51
Internal Ruby Error when running SimpleCov
/Users/andrew/.rvm/gems/ruby-1.9.2-p290/gems/ebay-1.1/lib/eBayMappingRegistry.rb:31220: [BUG] bug
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0]
-- control frame ----------
c:0034 p:66249 s:0116 b:0116 l:000115 d:000115 CLASS /Users/andrew/.rvm/gems/ruby-1.9.2-p290/gems/ebay-1.1/lib/eBayMappingRegistry.rb:31220
c:0033 p:0039 s:0114 b:0114 l:000113 d:000113 TOP /Users/andrew/.rvm/gems/ruby-1.9.2-p290/gems/ebay-1.1/lib/eBayMappingRegistry.rb:4
c:0032 p:---- s:0112 b:0112 l:000111 d:000111 FINISH
c:0031 p:---- s:0110 b:0110 l:000109 d:000109 CFUNC :require
c:0030 p:0055 s:0106 b:0106 l:000105 d:000105 METHOD /Users/andrew/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:184
c:0029 p:0027 s:0100 b:0100 l:000099 d:000099 TOP /Users/andrew/.rvm/gems/ruby-1.9.2-p290/gems/ebay-1.1/lib/eBayDriver.rb:2
@aselder
aselder / gist:944943
Created April 27, 2011 19:03
Patch for param parsing to check for encoded latin-1 URL parameters
#
# Source: https://rails.lighthouseapp.com/projects/8994/tickets/2188-i18n-fails-with-multibyte-strings-in-ruby-19-similar-to-2038
# (fix_params.rb)
module ActionController
class Request
private
def check_string_encoding(str)
str.valid_encoding? ? str : str.force_encoding("iso-8859-1").encode("utf-8")
ruby-1.9.2-p136 :001 > require 'spec/rails'
=> []
ruby-1.9.2-p136 :002 > Spec::Example::ExampleGroupHierarchy.new(::Spec::Rails::Example::ControllerExampleGroup)
1: Spec::Rails::Example::ControllerExampleGroup
2: Spec::Rails::Example::ControllerExampleGroup
3: Spec::Rails::Example::ControllerExampleGroup
1: Spec::Rails::Example::FunctionalExampleGroup
2: Spec::Rails::Example::FunctionalExampleGroup
3: Spec::Rails::Example::FunctionalExampleGroup
1: ActionController::TestCase
development:
jmx_port: 9990
log_dir: logs/development
data_dir: data/development
rsync_port: 8993
replicate_as_master: false
replicate_as_slave: false
search_master_hostname: not_used_in_dev_or_test
search_master_port: not_used_in_dev_or_test
hostname: localhost
@aselder
aselder / gist:668480
Created November 8, 2010 23:33
DEBUG_RESOLVER output in Infinite Loop
Last login: Mon Nov 8 14:15:15 on ttys005
-bash: /Users/andrew/Fansnap/fancat/gitsvn/code/devtools/bashrc: No such file or directory
andrew:~$ cd /Volumes/WorkDisk/Fancat/fancat/gitsvn/codeandrew:code[bundler*]$ export DEBUG_RESOLVER=true
andrew:code[bundler*]$ bundle install
1
Fetching source index for http://rubygems.org/
2
3
==== Iterating ====
@aselder
aselder / gist:668475
Created November 8, 2010 23:31
Gemfile
source :rubygems
gem 'mysql'
gem 'rails', '2.3.8'
gem 'test-unit', '1.2.3'
gem 'oauth', "0.4.3"
gem 'haml', '3.0.12'
gem 'uuid', '2.3.1'
gem 'tlsmail', '0.0.1'
gem 'hpricot', '0.8.3'