This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I, [2010-12-06T09:33:27.030001 #27061] INFO -- : unlinking existing socket=/tmp/.unicorn-socket | |
I, [2010-12-06T09:33:27.030259 #27061] INFO -- : listening on addr=/tmp/.unicorn-socket fd=3 | |
I, [2010-12-06T09:33:27.030806 #27061] INFO -- : Refreshing Gem list | |
/usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/runtime.rb:27:in `setup': You have already activated rack 1.0.1, but your Gemfile requires rack 1.2.1. Consider using bundle exec. (Gem::LoadError) | |
from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/spec_set.rb:12:in `each' | |
from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/spec_set.rb:12:in `each' | |
from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/runtime.rb:17:in `setup' | |
from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler.rb:100:in `setup' | |
from /var/www/releases/20101206173428/config/boot.rb:8 | |
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Facebook | |
attr_accessor :user | |
def initialize(user) | |
self.user = user | |
end | |
def post(user, params={}) | |
params = normalize_params(params, %w(message picture link name caption description source)) | |
client = OAuth2::Client.new(app_id, app_secret, :site => 'https://graph.facebook.com/', :parse_json => true) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo < ActiveRecord::Base | |
before_create :make_token | |
private | |
TOKEN_SYMBOLS = (('A'..'Z').to_a + ('a'..'z').to_a + (0..9).to_a) | |
def make_token | |
self.token = (1..12).inject(""){|token, num| token += TOKEN_SYMBOLS.rand.to_s } | |
make_token if self.class.find_by_token(self.token) | |
self.token | |
end |
OlderNewer