Skip to content

Instantly share code, notes, and snippets.

View plentz's full-sized avatar

Diego Plentz plentz

View GitHub Profile
@plentz
plentz / gist:898137
Created April 1, 2011 13:28
ruby-1.9.2-p180 + ruby-debug segfault
/Users/plentz/.rvm/gems/ruby-1.9.2-p180/gems/ruby-debug-ide-0.4.17.beta3/lib/ruby-debug/xml_printer.rb:92: [BUG] Segmentation fault
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.6.0]
-- control frame ----------
c:0131 p:---- s:0623 b:0623 l:000622 d:000622 CFUNC :frame_file
c:0130 p:0014 s:0619 b:0619 l:000618 d:000618 METHOD /Users/plentz/.rvm/gems/ruby-1.9.2-p180/gems/ruby-debug-ide-0.4.17.beta3/lib/ruby-debug/xml_printer.rb:92
c:0129 p:0026 s:0612 b:0612 l:000606 d:000611 BLOCK (eval):5
c:0128 p:0019 s:0610 b:0610 l:000609 d:000609 METHOD /Users/plentz/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/monitor.rb:201
c:0127 p:0012 s:0607 b:0607 l:000606 d:000606 METHOD (eval):3
@plentz
plentz / gist:898590
Created April 1, 2011 18:14
iphone4
apps:
- 1password(e compra a versao pra windows/mac tb - tu vai ter um trabalho pra alterar todas tuas senhas pra ele, mas vale a pena pela segurança - sincroniza os 2 via dropbox): 2 senhas diferentes e relativamente difíceis, mas que tu precisa lembrar: o master password do 1password e a senha do dropbox
- apontador radar
- facebook
- find my iphone(e se cadastra JÁ no mobile.me e deixa configurado no teu iphone isso - testa pela web se ta funcionando)
- flickr
- food brasil
- google
- google earth
- meebo
@plentz
plentz / gist:912324
Created April 10, 2011 13:00
after updating(rvm get head) from 1.5.2 to 1.6.1 I got this error
Installed RVM HEAD version:
rvm 1.6.1 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]
/Users/plentz/.rvm/scripts/get: line 191: syntax error near unexpected token `;;'
/Users/plentz/.rvm/scripts/get: line 191: ` ;;'
~ $
#development.rb
Foo::Application.configure do
config.middleware.delete Rack::Runtime
end
~/foo $ rake middleware
(in /Users/plentz/foo)
rake aborted!
No such middleware to insert before: "Rack::Runtime"
@plentz
plentz / gist:957726
Created May 5, 2011 19:34
update rubygems
~/Projects/prime/bestsales (master) $ rails s
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/plentz/.rvm/gems/ruby-1.9.2-p180@global/specifications/bundler-1.0.0.rc.5.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/plentz/.rvm/gems/ruby-1.9.2-p180@global/specifications/bundler-1.0.12.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/plentz/.rvm/gems/ruby-1.9.2-p180@global/specifications/erubis-2.6.6.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/plentz
~ $ rvm --trace install jruby
+ [[ -n '' ]]
+ export 'PS4=+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > '
+ PS4='+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > '
+ /scripts/cli : __rvm_parse_args() 687 > [[ -z '' ]]
+ /scripts/cli : __rvm_parse_args() 687 > [[ -n '' ]]
+ /scripts/cli : __rvm_parse_args() 689 > [[ 0 -eq 1 ]]
+ /scripts/cli : __rvm_parse_args() 689 > [[ -n '' ]]
+ /scripts/cli : __rvm_parse_args() 17 > [[ -n install ]]
+ /scripts/cli : __rvm_parse_args() 19 > rvm_token=install
module ActiveRecord
class Base
class << self
def default_scope(options = {})
reset_scoped_methods
default_scoping = self.default_scoping.dup
previous = default_scoping.pop
if previous.respond_to?(:call) or options.respond_to?(:call)
~/Projects/prime/bestsales (master) $ bundle install
Fetching source index for http://rubygems.org/
Using rake (0.8.7)
Using ZenTest (4.5.0)
Using abstract (1.0.0)
Using activesupport (3.0.7)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.7)
Using erubis (2.6.6)
@plentz
plentz / gist:979166
Created May 18, 2011 18:18
newrelic: problem with passenger detection
prmpoav100:/app/log# cat newrelic_agent.log
# Logfile created on 2011-05-18 13:53:21 -0300 by logger.rb/25413
[05/18/11 13:53:21 -0300 prmpoav100 (29651)] INFO : Dispatcher: passenger
[05/18/11 13:53:21 -0300 prmpoav100 (29651)] INFO : Application: tarifador (staging)
[05/18/11 13:53:21 -0300 prmpoav100 (29651)] INFO : Connecting workers after forking.
[05/18/11 13:53:21 -0300 prmpoav100 (29651)] INFO : New Relic RPM Agent 3.0.0 Initialized: pid = 29651
[05/18/11 13:53:21 -0300 prmpoav100 (29651)] INFO : Agent Log found in /app/log/newrelic_agent.log
[05/18/11 13:53:21 -0300 prmpoav100 (29651)] WARN : An older version of Phusion Passenger has been detected. We recommend using at least release 2.1.1.
[05/18/11 13:53:23 -0300 prmpoav100 (29661)] INFO : Starting the worker thread in 29661 after forking.
ruby-1.9.2-p180 :002 > require 'time'
=> true
ruby-1.9.2-p180 :003 > Time.now.httpdate
=> "Wed, 01 Jun 2011 20:03:43 GMT"
ruby-1.9.2-p180 :004 > puts Time.httpdate("Wed, 01 Jun 2011 20:03:43 GMT")
2011-06-01 17:03:43 -0300
=> nil