Skip to content

Instantly share code, notes, and snippets.

@jc00ke
jc00ke / gist:7cb0b1e0c40646717f1a
Created January 11, 2015 03:43
Calagator, papertrail reify failure on rbx
1) Venue geocode addressing when versioning should store old content in past versions
Failure/Error: expect(venue.versions.last.reify.title).to eq original_title
TypeError:
Tuple cannot be created via allocate()
# kernel/bootstrap/tuple.rb:5:in `allocate'
# /home/jesse/projects/rubinius/rubinius/gems/gems/psych-2.0.9/lib/psych/visitors/to_ruby.rb:370:in `revive'
# /home/jesse/projects/rubinius/rubinius/gems/gems/psych-2.0.9/lib/psych/visitors/to_ruby.rb:207:in `visit_Psych_Nodes_Mapping'
# /home/jesse/projects/rubinius/rubinius/gems/gems/psych-2.0.9/lib/psych/visitors/visitor.rb:15:in `visit'
# /home/jesse/projects/rubinius/rubinius/gems/gems/psych-2.0.9/lib/psych/visitors/visitor.rb:5:in `accept'
# /home/jesse/projects/rubinius/rubinius/gems/gems/psych-2.0.9/lib/psych/visitors/to_ruby.rb:31:in `accept'
@jc00ke
jc00ke / chomp_spec.rb
Last active August 29, 2015 14:12 — forked from gstark/chomp_spec.rb
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)
require File.expand_path('../../string/fixtures/classes', __FILE__)
# FIXME: These methods exist on 1.9 only when the -n or -p option is passed to
# ruby, but we currently don't have a way of specifying that.
ruby_version_is ""..."1.9" do
describe "Kernel#chomp" do
it "is a private method" do
Kernel.should have_private_instance_method(:chomp)
@jc00ke
jc00ke / gist:d82a78e90614037c6462
Created December 26, 2014 20:39
EM doesn't compile on 2.2.0p0
gem+ eventmachine -v '1.0.3'
Building native extensions. This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
/home/jesse/.rubies/ruby-2.2.0/bin/ruby -r ./siteconf20141226-13786-zj9j4y.rb extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... no
checking for inotify_init() in sys/inotify.h... yes
checking for writev() in sys/uio.h... yes
@jc00ke
jc00ke / symbol_gc.rb
Last active August 29, 2015 14:12
Symbol GC object ids
>> s = "sym1".to_sym
=> :sym1
>> s.object_id
=> 70102969563660
>> GC.start
=> nil
>> s = "sym1".to_sym
=> :sym1
>> s.object_id
=> 70102969563660
@jc00ke
jc00ke / 44837581.txt
Created December 22, 2014 16:58
RBX Travis Build 44837579 failure
This file has been truncated, but you can view the full file.
Using worker: saucelabs-mac-1.worker.travis-ci.org:travis-mac_osx-5
travis_fold:start:system_info
Build system information
Build language: cpp
travis_fold:end:system_info

@jc00ke
jc00ke / app.rb
Created December 18, 2014 23:11
Angelo blowing up with simple example
require "angelo"
class App < Angelo::Base
get "/" do
"hi"
end
end
@jc00ke
jc00ke / gist:6efaf24fa67a4df2d7e9
Created December 15, 2014 21:36
xfsettingsd error
~  xfsettingsd --replace &
~  The program 'xfsettingsd' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadRRCrtc (invalid Crtc parameter)'.
(Details: serial 895 error_code 148 request_code 140 minor_code 21)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
✘  ~/p/travis-rbx-bundler-debug   master ±  rm -rf ~/.gem/rbx/2.1.0/specifications/* ~/.gem/rbx/2.1.0/cache/*
~/p/travis-rbx-bundler-debug   master ±  bundle --jobs=8
Fetching gem metadata from https://rubygems.org/.........
spec_from_gem
spec_from_gem
Gem::Package::FormatError: package is corrupt, exception while verifying: method 'call': given 0, expected 2 (ArgumentError) in /home/jesse/.gem/rbx/2.1.0/cache/builder-3.0.4.gem
Gem::Package::FormatError: package is corrupt, exception while verifying: method 'call': given 0, expected 2 (ArgumentError) in /home/jesse/.gem/rbx/2.1.0/cache/multi_json-1.10.1.gem
spec_from_gem
def td(n)
eval(eval('"'+"
@jc00ke
jc00ke / app.rb
Created December 3, 2014 08:10
Angelo test
require "angelo"
$price ||= 0
class App < Angelo::Base
websocket '/hearts' do |ws|
websockets[:hearts] << ws
ws.on_message do |msg|
$price += 1
ws.write({ price: $price }.to_json)