iOS how to understand symbolicated errors - ios

I'm using swift to code. I have symbolicated errors but I still can't understand exactly what the error means. I can see these informations
The class name
The function name
Does it contain any other information like
Line number
Type of error (like array out of index..)
or more?
objc_retain # 0xa
-[PFDecoder decodeDictionary:] # 0x3d, PFDecoder.m : 86
-[PFDecoder decodeObject:] # 0x13, PFDecoder.m : 112
#ERROR!
#ERROR!
#ERROR!
_TFV4Cozy11CozyConfigs14checkAnalyticsfMS0_FT_T_ # 0xa2
_TFC4Cozy11AppDelegate11applicationfS0_FTCSo13UIApplication29didFinishLaunchingWithOptionsGSqGVSs10DictionaryCSo8NSObjectPSs9AnyObject____Sb # 0x18a
_TToFC4Cozy11AppDelegate11applicationfS0_FTCSo13UIApplication29didFinishLaunchingWithOptionsGSqGVSs10DictionaryCSo8NSObjectPSs9AnyObject____Sb # 0x10a
-[NSObject(TLDelegateSW) tlsw_application:didFinishLaunchingWithOptions:] # 0x45
-[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] # 0x117
-[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] # 0x933
-[UIApplication _runWithMainScene:transitionContext:completion:] # 0x557
__84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke # 0x23
-[UIApplication workspaceDidEndTransaction:] # 0x81
__31-[FBSSerialQueue performAsync:]_block_invoke # 0xb
__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ # 0xb
__CFRunLoopDoBlocks # 0xd7
__CFRunLoopRun # 0x2f5
CFRunLoopRunSpecific # 0x1db
CFRunLoopRunInMode # 0x69
-[UIApplication _run] # 0x22d
UIApplicationMain # 0x59f
main # 0x86
start # 0x1
This is another crash log which is shorter.(maybe it'll be easier to explain)
_TFFV4Cozy10CardLoader10initializeFMS0_FT4viewGSqCSo6UIView_14tutorialActiveSb_T_U0_FTGSQPSs9AnyObject__GSQCSo7NSError__T_ # 0x2720
_TFFV4Cozy10CardLoader10initializeFMS0_FT4viewGSqCSo6UIView_14tutorialActiveSb_T_U0_FTGSQPSs9AnyObject__GSQCSo7NSError__T_ # 0xe44
__72-[BFTask(Private) continueWithMainThreadResultBlock:executeIfCancelled:]_block_invoke # 0x50, BFTask+Private.m : 52
__41-[BFTask continueWithExecutor:withBlock:]_block_invoke_2 # 0x8, BFTask.m : 287
# 0x13a8
# 0x1368
# 0x597c
__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ # 0x8
__CFRunLoopRun # 0x5d0
CFRunLoopRunSpecific # 0x188
# 0xb5a0
UIApplicationMain # 0x5cc
main # 0x70
# 0x2a04

The first one seems like it crashes in the checkAnalytics method of your CozyConfigs class

Related

Ruby on Rails – Crashes on Rails Generate Model

Rails newbie here, and I'm trying to generate a model using rails generate model. The command I used is exactly rails generate model testmodel name:string, and I got the ridiculously long error below. I'm sorry for the extremely vague question, but I have no idea what to make of this.
I really don't know what to make of it, but I'm assuming it's a problem with the sqlite gem.
Has anyone had this problem before?
Fares:project_name faresalaboud$ rails generate model testmodel name:string
/Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/sqlite3-1.3.9/lib/sqlite3/sqlite3_native.bundle: [BUG] Segmentation fault at 0x00000000000418
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/CrashReporter
* /Library/Logs/CrashReporter
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
for more details.
-- Control frame information -----------------------------------------------
c:0017 p:-17588820269308 s:0059 e:000058 TOP [FINISH]
c:0016 p:---- s:0057 e:000056 CFUNC :require
c:0015 p:0020 s:0053 e:000052 BLOCK /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/sqlite3-1.3.9/lib/sqlite3.rb:6
c:0014 p:0032 s:0050 e:000049 TOP /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/sqlite3-1.3.9/lib/sqlite3.rb:2 [FINISH]
c:0013 p:---- s:0048 e:000047 CFUNC :require
c:0012 p:0037 s:0044 e:000043 BLOCK /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/runtime.rb:76 [FINISH]
c:0011 p:---- s:0041 e:000040 CFUNC :each
c:0010 p:0055 s:0038 e:000037 BLOCK /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/runtime.rb:72 [FINISH]
c:0009 p:---- s:0031 e:000030 CFUNC :each
c:0008 p:0030 s:0028 e:000027 METHOD /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/runtime.rb:61
c:0007 p:0013 s:0024 e:000023 METHOD /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler.rb:132
c:0006 p:0047 s:0020 e:000019 TOP /Users/faresalaboud/rails_projects/alfaris_guests/config/application.rb:7 [FINISH]
c:0005 p:---- s:0018 e:000017 CFUNC :require
c:0004 p:0289 s:0014 e:000013 TOP /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.0.5/lib/rails/commands.rb:43 [FINISH]
c:0003 p:---- s:0008 e:000007 CFUNC :require
c:0002 p:0034 s:0004 E:002478 EVAL bin/rails:4 [FINISH]
c:0001 p:0000 s:0002 E:001198 TOP [FINISH]
bin/rails:4:in `<main>'
bin/rails:4:in `require'
/Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.0.5/lib/rails/commands.rb:43:in `<top (required)>'
/Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.0.5/lib/rails/commands.rb:43:in `require'
/Users/faresalaboud/rails_projects/alfaris_guests/config/application.rb:7:in `<top (required)>'
/Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler.rb:132:in `require'
/Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/runtime.rb:61:in `require'
/Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/runtime.rb:61:in `each'
/Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/runtime.rb:72:in `block in require'
/Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/runtime.rb:72:in `each'
/Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/runtime.rb:76:in `require'
/Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/sqlite3-1.3.9/lib/sqlite3.rb:2:in `<top (required)>'
/Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/sqlite3-1.3.9/lib/sqlite3.rb:6:in `rescue in <top (required)>'
/Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/sqlite3-1.3.9/lib/sqlite3.rb:6:in `require'
-- C level backtrace information -------------------------------------------
0 libruby.2.1.0.dylib 0x000000010b99b303 rb_print_backtrace + 29
1 libruby.2.1.0.dylib 0x000000010b99b3ea rb_vm_bugreport + 124
2 libruby.2.1.0.dylib 0x000000010b8a5aa3 report_bug + 285
3 libruby.2.1.0.dylib 0x000000010b8a5981 rb_bug + 179
4 libruby.2.1.0.dylib 0x000000010b93ddbe check_stack_overflow + 0
5 libsystem_platform.dylib 0x00007fff9304c5aa _sigtramp + 26
6 libruby.2.0.0.dylib 0x000000010bfa543a ruby_xmalloc + 26
7 ??? 0x00007ff9bb12dd80 0x0 + 140710562160000
-- Other runtime information -----------------------------------------------
* Loaded script: bin/rails
* Loaded features:
0 enumerator.so
1 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/enc/encdb.bundle
2 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/enc/trans/transdb.bundle
3 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/rbconfig.rb
4 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/compatibility.rb
5 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/defaults.rb
6 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/deprecate.rb
7 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/errors.rb
8 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/version.rb
9 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/requirement.rb
10 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/platform.rb
11 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/basic_specification.rb
12 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/stub_specification.rb
13 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb
14 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/exceptions.rb
15 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb
16 thread.rb
17 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/thread.bundle
18 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/monitor.rb
19 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb
20 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems.rb
21 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/pathname.bundle
22 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/pathname.rb
23 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/constants.rb
24 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/user_interaction.rb
25 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/etc.bundle
26 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/config_file.rb
27 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/rubygems_integration.rb
28 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/current_ruby.rb
29 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb
30 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/shared_helpers.rb
31 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/fileutils.rb
32 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/gem_path_manipulation.rb
33 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/gem_helpers.rb
34 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/match_platform.rb
35 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/rubygems_ext.rb
36 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/version.rb
37 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler.rb
38 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/settings.rb
39 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/path_support.rb
40 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/digest.bundle
41 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/digest.rb
42 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/digest/sha1.bundle
43 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/set.rb
44 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/definition.rb
45 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/dependency.rb
46 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/ruby_dsl.rb
47 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/dsl.rb
48 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/source.rb
49 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/uri/common.rb
50 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/uri/generic.rb
51 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/uri/ftp.rb
52 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/uri/http.rb
53 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/uri/https.rb
54 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/uri/ldap.rb
55 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/uri/ldaps.rb
56 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/uri/mailto.rb
57 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/uri.rb
58 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/socket.bundle
59 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/socket.rb
60 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/timeout.rb
61 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/net/protocol.rb
62 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/zlib.bundle
63 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/stringio.bundle
64 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/net/http/exceptions.rb
65 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/net/http/header.rb
66 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/net/http/generic_request.rb
67 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/net/http/request.rb
68 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/net/http/requests.rb
69 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/net/http/response.rb
70 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/net/http/responses.rb
71 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/net/http/proxy_delta.rb
72 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/net/http/backward.rb
73 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/net/http.rb
74 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/date_core.bundle
75 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/date/format.rb
76 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/date.rb
77 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/time.rb
78 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/request.rb
79 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/cgi/core.rb
80 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/cgi/util.rb
81 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/cgi/cookie.rb
82 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/cgi.rb
83 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/uri_formatter.rb
84 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/fcntl.bundle
85 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle
86 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/openssl/bn.rb
87 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/openssl/cipher.rb
88 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/openssl/config.rb
89 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/openssl/digest.rb
90 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/openssl/x509.rb
91 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/openssl/buffering.rb
92 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/openssl/ssl.rb
93 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/openssl.rb
94 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/securerandom.rb
95 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/resolv.rb
96 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/remote_fetcher.rb
97 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/text.rb
98 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/name_tuple.rb
99 /usr/local/Cellar/ruby/2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/spec_fetcher.rb
100 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/source/rubygems.rb
101 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/strscan.bundle
102 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/source/path.rb
103 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/source/git.rb
104 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/lockfile_parser.rb
105 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/lazy_specification.rb
106 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/tsort.rb
107 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/forwardable.rb
108 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/spec_set.rb
109 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/environment.rb
110 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/runtime.rb
111 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/index.rb
112 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/remote_specification.rb
113 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/endpoint_specification.rb
114 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/dep_proxy.rb
115 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481#global/gems/bundler-1.6.3/lib/bundler/setup.rb
116 /Users/faresalaboud/rails_projects/alfaris_guests/config/boot.rb
117 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thread_safe-0.3.4/lib/thread_safe/version.rb
118 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/delegate.rb
119 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thread_safe-0.3.4/lib/thread_safe/synchronized_delegator.rb
120 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thread_safe-0.3.4/lib/thread_safe.rb
121 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/core_ext/array/prepend_and_append.rb
122 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/core_ext/hash/deep_merge.rb
123 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/core_ext/hash/except.rb
124 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/core_ext/hash/slice.rb
125 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/i18n-0.6.9/lib/i18n/version.rb
126 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/i18n-0.6.9/lib/i18n/exceptions.rb
127 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/i18n-0.6.9/lib/i18n/interpolate/ruby.rb
128 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/i18n-0.6.9/lib/i18n.rb
129 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/lazy_load_hooks.rb
130 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/i18n-0.6.9/lib/i18n/config.rb
131 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/i18n.rb
132 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thread_safe-0.3.4/lib/thread_safe/non_concurrent_cache_backend.rb
133 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thread_safe-0.3.4/lib/thread_safe/mri_cache_backend.rb
134 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thread_safe-0.3.4/lib/thread_safe/cache.rb
135 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/inflector/inflections.rb
136 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/inflections.rb
137 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/inflector/methods.rb
138 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/dependencies/autoload.rb
139 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/version.rb
140 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/core_ext/array/extract_options.rb
141 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/core_ext/class/attribute_accessors.rb
142 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/concern.rb
143 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/logger_silence.rb
144 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/logger.rb
145 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/logger.rb
146 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support.rb
147 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/core_ext/object/blank.rb
148 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/core_ext/kernel/singleton_class.rb
149 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/core_ext/module/attribute_accessors.rb
150 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/multibyte.rb
151 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/core_ext/string/multibyte.rb
152 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/inflector/transliterate.rb
153 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/core_ext/string/inflections.rb
154 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/command.rb
155 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/core_ext/hash_with_indifferent_access.rb
156 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/core_ext/ordered_hash.rb
157 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/error.rb
158 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/invocation.rb
159 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/parser/argument.rb
160 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/parser/arguments.rb
161 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/parser/option.rb
162 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/parser/options.rb
163 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/parser.rb
164 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/shell.rb
165 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/line_editor/basic.rb
166 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/readline.bundle
167 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/line_editor/readline.rb
168 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/line_editor.rb
169 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/util.rb
170 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/base.rb
171 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/group.rb
172 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/open-uri.rb
173 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.0.5/lib/rails/generators/actions.rb
174 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/core_ext/io_binary_read.rb
175 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb
176 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/actions/create_file.rb
177 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/actions/create_link.rb
178 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/actions/directory.rb
179 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/erb.rb
180 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/actions/file_manipulation.rb
181 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb
182 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/actions.rb
183 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.0.5/lib/rails/generators/base.rb
184 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.0.5/lib/rails/generators.rb
185 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.0.5/lib/rails/ruby_version_check.rb
186 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/tmpdir.rb
187 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/tempfile.rb
188 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/core_ext/kernel/reporting.rb
189 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/key_generator.rb
190 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.0.5/lib/rails/initializable.rb
191 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/singleton.rb
192 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/core_ext/module/delegation.rb
193 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/deprecation/instance_delegator.rb
194 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/notifications/instrumenter.rb
195 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/mutex_m.rb
196 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/notifications/fanout.rb
197 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/per_thread_registry.rb
198 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/notifications.rb
199 /Users/faresalaboud/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.5/lib/active_support/deprecation/behaviors.rb
....
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
Abort trap: 6
Searched around and I think you will find luck on this other stack overflow answer. I was about to suggest a more radical move - a complete uninstall of rvm and rails, and reinstalling, but start here first.
If you can't do other rails commands like
rails console
then you will probably have to go this route:
Use this link to nuke your rvm install. And make sure you're following the official rvm install guide here.

Fog, Amazon S3 and Carrierwave Rails issue

UPDATED CONTENT
My Setup is now as follows:
#Carrierwave Initializer
CarrierWave.configure do |config|
config.fog_credentials = {
:provider => 'AWS',
:aws_access_key_id => ENV['S3_KEY'],
:aws_secret_access_key => ENV['S3_SECRET'],
}
config.fog_directory = ENV['S3_BUCKET_NAME']
config.fog_public = false # optional, defaults to true
config.fog_attributes = {'Cache-Control'=>'max-age=315576000'}
end
#Uploader
class ProteinUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick
storage :fog
def store_dir
"images/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
end
#Heroku Config Variables
S3_BUCKET_NAME = top5protein
S3_KEY = 'xxx'
S3_SECRET = 'xxx'
#Gemfile
...
gem "fog", "~> 1.14.0"
gem "excon", "~> 0.25.3"
gem 'carrierwave'
gem 'activeadmin'
...
And the error I am still getting is:
Excon::Errors::Forbidden (Expected(200) <=> Actual(403 Forbidden)
2013-07-28T11:51:13.251291+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/excon-0.25.3/lib/excon/connection.rb:260:in `rescue in request'
2013-07-28T11:51:13.251455+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/excon-0.25.3/lib/excon/connection.rb:220:in `request'
2013-07-28T11:51:13.251056+00:00 app[web.1]: FYyKoH99bOV97aK1TQI9dEhIBycFUg2TyP2fYuzY1/Ke+TXevyjKlUA</HostId><SignatureProvided>ZuHHwrD3Qdo9IHNhE14eKiB0OgY=</SignatureProvided><StringToSign>PUT\n\nimage/png\nSun, 28 Jul 2013 11:51:12 +0000\nx-amz-acl:private\n/top5protein/images/general/image/2/Protein1.png</StringToSign><AWSAccessKeyId>AKIAJ5GKDLKK3CPHNTGA</AWSAccessKeyId></Error>", #headers={"x-amz-request-id"=>"04AD4FA1DDE488CE", "x-amz-id-2"=>"SkpxPPpk0FYyKoH99bOV97aK1TQI9dEhIBycFUg2TyP2fYuzY1/Ke+TXevyjKlUA", "Content-Type"=>"application/xml", "Transfer-Encoding"=>"chunked", "Date"=>"Sun, 28 Jul 2013 11:51:12 GMT", "Connection"=>"close", "Server"=>"AmazonS3"}, #status=403, #remote_ip="207.171.163.195">):
and
HNTGA</AWSAccessKeyId></Error>", :headers=>{"x-amz-request-id"=>"04AD4FA1DDE488CE", "x-amz-id-2"=>"SkpxPPpk0FYyKoH99bOV97aK1TQI9dEhIBycFUg2TyP2fYuzY1/Ke+TXevyjKlUA", "Content-Type"=>"application/xml", "Transfer-Encoding"=>"chunked", "Date"=>"Sun, 28 Jul 2013 11:51:12 GMT", "Connection"=>"close", "Server"=>"AmazonS3"}, :status=>403, :remote_ip=>"207.171.163.195"}, #body="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message><StringToSignBytes>50 55 54 0a 0a 69 6d 61 67 65 2f 70 6e 67 0a 53 75 6e 2c 20 32 38 20 4a 75 6c 20 32 30 31 33 20 31 31 3a 35 31 3a 31 32 20 2b 30 30 30 30 0a 78 2d 61 6d 7a 2d 61 63 6c 3a 70 72 69 76 61 74 65 0a 2f 74 6f 70 35 70 72 6f 74 65 69 6e 2f 69 6d 61 67 65 73 2f 67 65 6e 65 72 61 6c 2f 69 6d 61 67 65 2f 32 2f 50 72 6f 74 65 69 6e 31 2e 70 6e 67</StringToSignBytes><RequestId>04AD4FA1DDE488CE</RequestId><HostId>SkpxPPpk0
If anyone has any further advice that might help then that would be great!
In your case (as noted in the last comment) and in mine, the reason for this error was an incorrect secret key.
I thought I'd leave this here for future people getting this error so they could check the most probable source of the problem first.

Deleting singleton object and reconstructing in ruby

I've this situation wherein a singleton class creates object of a model and is used further in my code.
Now, the problem is that occasionally the connection between application and database is broken and all subsequent calls to the singleton fail. While I'm working on fixing the issue, a workaround is required immediately. I believe the solution I'm thinking of, would work but not sure if it will leak memory, cause deadlocks etc.
Here's the original (partial) code:
1 file_path = File.expand_path(File.dirname(__FILE__))
2 require file_path + '/action_factory'
3 require 'erb'
4
5 class Manager
6
7 def initialize(logger)
8 #logger = logger
9 end
10
11 def log_exception(e,method_name)
12 #logger.log :ERROR,"Manager",method_name,'',$$,'',e.backtrace[0] + ": Uncaught Exception " + e.message,DateTime.now,'system',''
13 e.backtrace.shift
14 #logger.log :ERROR,"Manager",method_name,'',$$,''," from " + e.backtrace.join("\n from ") + "(" + e.class.to_s + ")",DateTime.now,'system',''
15 end
16 def execute_action
17 return false if addresses.collect{|a| a if !a.to_s.empty?}.compact.empty?
18 begin
19 action = ActionFactory.instance().get_action(type)
20 return true
21 rescue Exception => e
22 action = nil ####### I'm planning to add this line ####
23 log_exception(e,this_method_name)
24 return false
25 end
26 end
27 end
28 require 'singleton'
29 $file_path=File.expand_path(File.dirname(__FILE__))
30 Dir[$file_path + '/actions/*_action.rb'].each { |filename| require filename }
31
32 class ActionFactory
33 include Singleton
34
35 def get_action(type)
36 action_type_obj = ActionType.find(:first, :select => "action_name", :conditions => ["id=?",type])
37 if(action_type_obj.nil? or action_type_obj.action_name.nil?)
38 raise "Undefined Action Type"
39 else
40 return eval("Actions::#{action_type_obj.action_name}").instance
41 end
42 end
43 end
The problem is that oracle connection is disconnected sometimes and the statement #36 fails returning InvalidStatement exception. All subsequent calls of the statement 19 fail.
I'm planning to add a statement : action = nil in the exception block in line 22. Will that suffice as a workaround or would it bring more issues like memory leakages, deadlocks etc?
If there is a better solution, I'll be glad to hear.
Thanks

chapter 2 rails tutorial - get BUS error after using rake db:migrate

HI I don't understand the error message I keep getting when I try to use
$rake db:migrate
in chapter 2 http://ruby.railstutorial.org/chapters/a-demo-app of this rails tutorial.
I'm using
rvm (latest)
ruby-1.9.2
rails 3.0.6
(I've tried using ruby-1.9.2-p180 and ruby-1.9-2-head in case the error is caused by a bug in one of these version - but I get the same result below.)
The steps are:
$ rails new first_app
$ mate Gemfile
edit Gemfile to use:
gem 'rails', '3.0.6'
gem 'sqlite3-ruby', '1.3.2', :require => 'sqlite3'
$ bundle install
$ rails generate scaffold User name:string email:string
works great, then...
$ rake db:migrate
error:
$ rake db:migrate --trace
(in /Users/dawnbuie/Documents/Projects/rubyonrails/rails_projects/first_app_again)
/Users/dawnbuie/.rvm/gems/ruby-1.9.2-head#1.9.2-head-gemset/gems/sqlite3-ruby-1.3.2/lib/sqlite3/sqlite3_native.bundle: [BUG] Bus Error
ruby 1.9.2p188 (2011-03-28 revision 31204) [i386-darwin10.6.0]
-- control frame ----------
c:0029 p:-8251844 s:0087 b:0087 l:000086 d:000086 TOP
c:0028 p:---- s:0085 b:0085 l:000084 d:000084 CFUNC :require
c:0027 p:0029 s:0081 b:0081 l:000077 d:000080 BLOCK /Users/dawnbuie/.rvm/gems/ruby-1.9.2-head#1.9.2-head-gemset/gems/sqlite3-ruby-1.3.2/lib/sqlite3.rb:6
c:0026 p:0035 s:0078 b:0078 l:000077 d:000077 TOP /Users/dawnbuie/.rvm/gems/ruby-1.9.2-head#1.9.2-head-gemset/gems/sqlite3-ruby-1.3.2/lib/sqlite3.rb:2
c:0025 p:---- s:0076 b:0076 l:000075 d:000075 FINISH
c:0024 p:---- s:0074 b:0074 l:000073 d:000073 CFUNC :require
c:0023 p:0026 s:0070 b:0070 l:000051 d:000069 BLOCK /Users/dawnbuie/.rvm/gems/ruby-1.9.2-head#1.9.2-head-gemset/gems/bundler-1.0.11/lib/bundler/runtime.rb:68
c:0022 p:---- s:0067 b:0067 l:000066 d:000066 FINISH
c:0021 p:---- s:0065 b:0065 l:000064 d:000064 CFUNC :each
c:0020 p:0091 s:0062 b:0062 l:000051 d:000061 BLOCK /Users/dawnbuie/.rvm/gems/ruby-1.9.2-head#1.9.2-head-gemset/gems/bundler-1.0.11/lib/bundler/runtime.rb:66
c:0019 p:---- s:0057 b:0057 l:000056 d:000056 FINISH
c:0018 p:---- s:0055 b:0055 l:000054 d:000054 CFUNC :each
c:0017 p:0046 s:0052 b:0052 l:000051 d:000051 METHOD /Users/dawnbuie/.rvm/gems/ruby-1.9.2-head#1.9.2-head-gemset/gems/bundler-1.0.11/lib/bundler/runtime.rb:55
c:0016 p:0021 s:0048 b:0048 l:000047 d:000047 METHOD /Users/dawnbuie/.rvm/gems/ruby-1.9.2-head#1.9.2-head-gemset/gems/bundler-1.0.11/lib/bundler.rb:120
c:0015 p:0079 s:0044 b:0044 l:000043 d:000043 TOP /Users/dawnbuie/Documents/Projects/rubyonrails/rails_projects/first_app_again/config/application.rb:7
c:0014 p:---- s:0042 b:0042 l:000041 d:000041 FINISH
c:0013 p:---- s:0040 b:0040 l:000039 d:000039 CFUNC :require
c:0012 p:0013 s:0036 b:0036 l:000035 d:000035 METHOD <internal:lib/rubygems/custom_require>:29
c:0011 p:0026 s:0031 b:0031 l:000030 d:000030 TOP /Users/dawnbuie/Documents/Projects/rubyonrails/rails_projects/first_app_again/Rakefile:4
c:0010 p:---- s:0029 b:0029 l:000028 d:000028 FINISH
c:0009 p:---- s:0027 b:0027 l:000026 d:000026 CFUNC :load
c:0008 p:0334 s:0023 b:0023 l:000022 d:000022 METHOD /Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:2373
c:0007 p:0009 s:0018 b:0018 l:000011 d:000017 BLOCK /Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:2007
c:0006 p:0009 s:0016 b:0016 l:000015 d:000015 METHOD /Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:2058
c:0005 p:0011 s:0012 b:0012 l:000011 d:000011 METHOD /Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:2006
c:0004 p:0021 s:0009 b:0009 l:000008 d:000008 METHOD /Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:1991
c:0003 p:0139 s:0006 b:0006 l:000b74 d:000ed4 EVAL /Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/bin/rake:35
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000b74 d:000b74 TOP
---------------------------
-- Ruby level backtrace information ----------------------------------------
/Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/bin/rake:35:in `<main>'
/Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:1991:in `run'
/Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
/Users/dawnbuie/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rake.rb:2373:in `load'
/Users/dawnbuie/Documents/Projects/rubyonrails/rails_projects/first_app_again/Rakefile:4:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/Users/dawnbuie/Documents/Projects/rubyonrails/rails_projects/first_app_again/config/application.rb:7:in `<top (required)>'
/Users/dawnbuie/.rvm/gems/ruby-1.9.2-head#1.9.2-head-gemset/gems/bundler-1.0.11/lib/bundler.rb:120:in `require'
/Users/dawnbuie/.rvm/gems/ruby-1.9.2-head#1.9.2-head-gemset/gems/bundler-1.0.11/lib/bundler/runtime.rb:55:in `require'
/Users/dawnbuie/.rvm/gems/ruby-1.9.2-head#1.9.2-head-gemset/gems/bundler-1.0.11/lib/bundler/runtime.rb:55:in `each'
/Users/dawnbuie/.rvm/gems/ruby-1.9.2-head#1.9.2-head-gemset/gems/bundler-1.0.11/lib/bundler/runtime.rb:66:in `block in require'
/Users/dawnbuie/.rvm/gems/ruby-1.9.2-head#1.9.2-head-gemset/gems/bundler-1.0.11/lib/bundler/runtime.rb:66:in `each'
/Users/dawnbuie/.rvm/gems/ruby-1.9.2-head#1.9.2-head-gemset/gems/bundler-1.0.11/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/Users/dawnbuie/.rvm/gems/ruby-1.9.2-head#1.9.2-head-gemset/gems/bundler-1.0.11/lib/bundler/runtime.rb:68:in `require'
/Users/dawnbuie/.rvm/gems/ruby-1.9.2-head#1.9.2-head-gemset/gems/sqlite3-ruby-1.3.2/lib/sqlite3.rb:2:in `<top (required)>'
/Users/dawnbuie/.rvm/gems/ruby-1.9.2-head#1.9.2-head-gemset/gems/sqlite3-ruby-1.3.2/lib/sqlite3.rb:6:in `rescue in <top (required)>'
/Users/dawnbuie/.rvm/gems/ruby-1.9.2-head#1.9.2-head-gemset/gems/sqlite3-ruby-1.3.2/lib/sqlite3.rb:6:in `require'
-- C level backtrace information -------------------------------------------
0 libruby.1.9.1.dylib 0x00195cb6 rb_vm_bugreport + 230
1 libruby.1.9.1.dylib 0x0003f0bf report_bug + 415
2 libruby.1.9.1.dylib 0x0003f16b rb_bug + 43
3 libruby.1.9.1.dylib 0x0010df5b sigbus + 27
4 libSystem.B.dylib 0x97b8246b _sigtramp + 43
5 ??? 0xffffffff 0x0 + 4294967295
6 libruby.1.dylib 0x00754f27 rb_intern + 62
7 libruby.1.dylib 0x0070b7b2 rb_define_module + 32
8 sqlite3_native.bundle 0x004f160f Init_sqlite3_native + 27
9 libruby.1.9.1.dylib 0x00004b84 dln_load + 244
10 libruby.1.9.1.dylib 0x001791db rb_vm_call_cfunc + 187
11 libruby.1.9.1.dylib 0x0004637e rb_require_safe + 1022
12 libruby.1.9.1.dylib 0x00191020 vm_call_method + 944
13 libruby.1.9.1.dylib 0x0017a855 vm_exec_core + 5397
14 libruby.1.9.1.dylib 0x00184afd vm_exec + 1821
15 libruby.1.9.1.dylib 0x00184fe6 rb_iseq_eval + 358
16 libruby.1.9.1.dylib 0x00044fb5 rb_load_internal + 293
17 libruby.1.9.1.dylib 0x000463b2 rb_require_safe + 1074
18 libruby.1.9.1.dylib 0x00191020 vm_call_method + 944
19 libruby.1.9.1.dylib 0x0017a855 vm_exec_core + 5397
20 libruby.1.9.1.dylib 0x00184afd vm_exec + 1821
21 libruby.1.9.1.dylib 0x0019232c rb_yield + 604
22 libruby.1.9.1.dylib 0x0000ac1e rb_ary_each + 62
23 libruby.1.9.1.dylib 0x00191020 vm_call_method + 944
24 libruby.1.9.1.dylib 0x0017a855 vm_exec_core + 5397
25 libruby.1.9.1.dylib 0x00184afd vm_exec + 1821
26 libruby.1.9.1.dylib 0x0019232c rb_yield + 604
27 libruby.1.9.1.dylib 0x0000ac1e rb_ary_each + 62
28 libruby.1.9.1.dylib 0x00191020 vm_call_method + 944
29 libruby.1.9.1.dylib 0x0017a855 vm_exec_core + 5397
30 libruby.1.9.1.dylib 0x00184afd vm_exec + 1821
31 libruby.1.9.1.dylib 0x00184fe6 rb_iseq_eval + 358
32 libruby.1.9.1.dylib 0x00044fb5 rb_load_internal + 293
33 libruby.1.9.1.dylib 0x000463b2 rb_require_safe + 1074
34 libruby.1.9.1.dylib 0x00191020 vm_call_method + 944
35 libruby.1.9.1.dylib 0x0017a855 vm_exec_core + 5397
36 libruby.1.9.1.dylib 0x00184afd vm_exec + 1821
37 libruby.1.9.1.dylib 0x00184fe6 rb_iseq_eval + 358
38 libruby.1.9.1.dylib 0x00044fb5 rb_load_internal + 293
39 libruby.1.9.1.dylib 0x00046998 rb_f_load + 136
40 libruby.1.9.1.dylib 0x00175845 call_cfunc + 581
41 libruby.1.9.1.dylib 0x00191020 vm_call_method + 944
42 libruby.1.9.1.dylib 0x0017a855 vm_exec_core + 5397
43 libruby.1.9.1.dylib 0x00184afd vm_exec + 1821
44 libruby.1.9.1.dylib 0x00184e57 rb_iseq_eval_main + 535
45 libruby.1.9.1.dylib 0x000425e9 ruby_exec_internal + 153
46 libruby.1.9.1.dylib 0x00044b4a ruby_run_node + 90
47 ruby 0x00001f1f main + 95
48 ruby 0x00001eb5 start + 53
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
Abort trap
Could the problem be with the sqlite3 version?
Ruby?
I looked at the bugreports http://www.ruby-lang.org/bugreport.html but nothing matches.
thanks for any insight
I just debugged the same issue on Ubuntu. It may have a similar fix on windows.
The issue was that I had a 1.8 gems folder in my PATH, and it was before the rvm bin, which messes up the sqlite native compile.
So first check your PATH to make sure there are no 1.8 dirs before the rvm ones.
Then follow Michael's steps to uninstall and reinstall the gem.
It sounds like you might have to recompile SQLite or the sqlite3-ruby gem (or both). Try running
$ gem uninstall sqlite3 sqlite3-ruby
$ gem install sqlite3
$ bundle install
(The sqlite3-ruby gem will automatically be reinstalled by the bundle command.)

"no block given" errors with cache_money

i've inherited a site that in production is generating dozens of "no block given" exceptions every 5 minutes.
the top of the stack trace is:
vendor/gems/nkallen-cache-money-0.2.5/lib/cash/accessor.rb:42:in `add'
vendor/gems/nkallen-cache-money-0.2.5/lib/cash/accessor.rb:33:in `get'
vendor/gems/nkallen-cache-money-0.2.5/lib/cash/accessor.rb:22:in `call'
vendor/gems/nkallen-cache-money-0.2.5/lib/cash/accessor.rb:22:in `fetch'
vendor/gems/nkallen-cache-money-0.2.5/lib/cash/accessor.rb:31:in `get'
so it appears that the problem is in the cache money plugin.
has anyone experienced something similar?
i've cut and pasted the relevant code below -- anyone more familiar with blocks able to discern any obvious problems?
11 def fetch(keys, options = {}, &block)
12 case keys
13 when Array
14 keys = keys.collect { |key| cache_key(key) }
15 hits = repository.get_multi(keys)
16 if (missed_keys = keys - hits.keys).any?
17 missed_values = block.call(missed_keys)
18 hits.merge!(missed_keys.zip(Array(missed_values)).to_hash)
19 end
20 hits
21 else
22 repository.get(cache_key(keys), options[:raw]) || (block ? block.call : nil)
23 end
24 end
25
26 def get(keys, options = {}, &block)
27 case keys
28 when Array
29 fetch(keys, options, &block)
30 else
31 fetch(keys, options) do
32 if block_given?
33 add(keys, result = yield(keys), options)
34 result
35 end
36 end
37 end
38 end
39
40 def add(key, value, options = {})
41 if repository.add(cache_key(key), value, options[:ttl] || 0, options[:raw]) == "NOT_STORED\r\n"
42 yield
43 end
44 end
line 33 is calling add, but not passing a block, though one is expected on line 42 and there's no block_given? check like there is in the get method. There doesn't really seem to be an appropriate block to pass in this case, as the block passed to get is already yielded to in the add call on line 33, so passing it again separately to add is probably not correct.
Changing line 42 to yield if block_given? should fix your error in this case and shouldn't cause problems elsewhere.
It's also worth noting that line 42 is only called if something was not stored, so you may want to look into why that's happening.

Resources