Skip to content

Instantly share code, notes, and snippets.

@smartcode
smartcode / Net::HTTPRetriableError.rb
Created April 17, 2012 18:52
OmniAuth Callback Net::HTTPRetriableError
/Users/.../.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:2632:in `error!'
oauth (0.4.5) lib/oauth/consumer.rb:216:in `token_request'
oauth (0.4.5) lib/oauth/tokens/request_token.rb:18:in `get_access_token'
omniauth-oauth (1.0.1) lib/omniauth/strategies/oauth.rb:57:in `callback_phase'
omniauth (1.1.0) lib/omniauth/strategy.rb:219:in `callback_call'
omniauth (1.1.0) lib/omniauth/strategy.rb:175:in `call!'
omniauth (1.1.0) lib/omniauth/strategy.rb:157:in `call'
omniauth (1.1.0) lib/omniauth/strategy.rb:177:in `call!'
omniauth (1.1.0) lib/omniauth/strategy.rb:157:in `call'
omniauth (1.1.0) lib/omniauth/strategy.rb:177:in `call!'
def around_api_response(api_template)
Rails.cache.fetch("api_response_#{self.class.to_s}_#{id}_#{api_template.to_s}", :expires_in => 1.hour) do
yield
end
end
@import "twitter/bootstrap";
// -------------------------------
// Links
@linkColor: #8b59c2;
@linkColorHover: darken(@linkColor, 10);
// Grays
@black: #000;
@smartcode
smartcode / gist:1373970
Created November 17, 2011 18:15
carrierwave_backgrounder
NameError (uninitialized constant Delayed):
carrierwave_backgrounder (0.0.5) lib/backgrounder/orm/base.rb:53:in `enqueue_file_background_job'
activesupport (3.1.1) lib/active_support/callbacks.rb:436:in `_run_save_callbacks'
activesupport (3.1.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
activerecord (3.1.1) lib/active_record/callbacks.rb:264:in `create_or_update'
activerecord (3.1.1) lib/active_record/persistence.rb:57:in `save!'
activerecord (3.1.1) lib/active_record/validations.rb:56:in `save!'
activerecord (3.1.1) lib/active_record/attribute_methods/dirty.rb:33:in `save!'
activerecord (3.1.1) lib/active_record/transactions.rb:246:in `block in save!'
activerecord (3.1.1) lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
@smartcode
smartcode / gist:1334969
Created November 2, 2011 21:22
NoMethodError: private method `write_uploader' backtrace
NoMethodError: private method `write_uploader' called for #<Item:0x007fd71682aa60>
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activemodel-3.1.1/lib/active_model/attribute_methods.rb:385:in `method_missing'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/attribute_methods.rb:60:in `method_missing'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/carrierwave-0.5.7/lib/carrierwave/mount.rb:299:in `write_identifier'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/carrierwave-0.5.7/lib/carrierwave/mount.rb:229:in `write_file_identifier'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:413:in `_run_save_callbacks'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/callbacks.rb:264:in `create_or_update'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_