Skip to content

Instantly share code, notes, and snippets.

View jcxplorer's full-sized avatar

João Cardoso jcxplorer

View GitHub Profile
~/Programming/rdevs[master]% rake routes --trace
(in /Users/joao/Programming/rdevs)
** Invoke routes (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined local variable or method `metals' for #<Rails::Engine::Configuration:0x0000010835fbd0>
/Users/joao/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/railtie/configuration.rb:86:in `method_missing'
/Users/joao/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/railtie/configuration.rb:121:in `block (2 levels) in default_middleware'
/Users/joao/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/stack.rb:35:in `call'
-- control frame ----------
c:0065 p:0019 s:0327 b:0326 l:001d48 d:000325 LAMBDA /Users/joao/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_view/lo
c:0064 p:---- s:0323 b:0323 l:000322 d:000322 FINISH
c:0063 p:0029 s:0321 b:0321 l:000320 d:000320 METHOD /Users/joao/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_view/lo
c:0062 p:0032 s:0316 b:0316 l:000307 d:000315 BLOCK /Users/joao/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_view/lo
c:0061 p:---- s:0313 b:0313 l:000312 d:000312 FINISH
c:0060 p:---- s:0311 b:0311 l:000310 d:000310 CFUNC :each
c:0059 p:0017 s:0308 b:0308 l:000307 d:000307 METHOD /Users/joao/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_view/lo
c:0058 p:0041 s:0304 b:0303 l:000302 d:000302 METHOD /Users/joao/.bundle/ruby/1.9.1/bundler/gems/rails-16a5
class Company
include Mongoid::Document
field :user_ids, :type => Array, :default => []
field :admin_ids, :type => Array, :default => []
def users
User.where(:_id.in => self.user_ids)
end
def admins
dyld: lazy symbol binding failed: Symbol not found: _capi_get_constant
Referenced from: /Users/joao/.rvm/gems/rbx-head/gems/unicorn-1.0.0/lib/unicorn_http.bundle
Expected in: flat namespace
dyld: Symbol not found: _capi_get_constant
Referenced from: /Users/joao/.rvm/gems/rbx-head/gems/unicorn-1.0.0/lib/unicorn_http.bundle
Expected in: flat namespace
[1] 79248 trace trap unicorn
Total running time: 351.65212240200003s
% cumulative self self total
time seconds seconds calls ms/call ms/call name
------------------------------------------------------------
99.40 349.53 349.53 352 992.98 992.99 IO.select_primitive
0.09 0.31 0.31 56 5.55 5.55 Rubinius::CodeLoader#load_compiled_file
0.06 0.22 0.22 410 0.54 0.54 IO::Buffer#fill
0.03 0.10 0.10 14 7.20 7.20 GC.collect_young
0.02 0.20 0.07 322 0.22 0.63 Rubinius::Melbourne#string_to_ast
Total running time: 224.009258858s
% cumulative self self total
time seconds seconds calls ms/call ms/call name
------------------------------------------------------------
57.39 207.39 207.39 7756 26.74 26.74 Rubinius::Channel#receive
8.88 32.10 32.10 165 194.56 194.56 Array#fast_pack
2.42 10.99 8.76 14465257 0.00 0.00 Hash::Entry#match?
2.26 8.17 8.17 1111 7.35 7.35 GC.collect_mature
1.55 21.98 5.60 1752235 0.00 0.01 Hash#[]=
index % time self children called name
----------------------------------------------------------
0.01 0.00 1561/11061 IO::Buffer#fill_from
0.00 0.00 1560/6240 IO::Buffer#shift
0.01 0.00 1397/4191 Mutex#lock
0.00 0.00 1397/6985 Mutex#unlock
0.00 0.03 90/180 Thread#alive?
0.00 0.00 47/141 ConditionVariable#signal
0.00 0.00 15/75 Thread#__run__
0.00 109.12 3/8 Thread#join_inner
LOCALE_1 = "~/Code/project/config/locales/fi.yml"
LOCALE_2 = "~/Code/project/config/locales/en.yml"
require 'yaml'
def flatten_keys(hash, prefix="")
keys = []
hash.keys.each do |key|
if hash[key].is_a? Hash
current_prefix = prefix + "#{key}."
set nocompatible " Must come first because it changes other options.
silent! call pathogen#runtime_append_all_bundles()
syntax enable " Turn on syntax highlighting.
filetype plugin indent on " Turn on file type detection.
set showcmd " Display incomplete commands.
set showmode " Display the mode you're in.
• rvm use 1.9.2@bundler
info: Using ruby 1.9.2 p0 with gemset bundler
• which bundle
/usr/bin/bundle
• gem install bundler
Successfully installed bundler-0.9.26
1 gem installed