I am running Ubuntu 11.10, jruby 1.4.0, ruby 1.8.7.174, rubygems 1.3.5, rails 2.3.4
I am working on a project that requires those specific versions of jruby, and Rails, along with glassfish server. The issue I am having is that when I start up glasfish,interminal it shows:
Missing these required gems:
warbler >= 1.2.1
...
Run `rake gems:install` to install the missing gems.
so I run jruby -S rake gems:install
And I get the output:
tlb rake task creation failed!, make sure you have installed the tlb-rspec1 gem
[Braintree] The SSL Certificate for the Sandbox environment will expire on 2010-12-01. Please check for an updated client library.
[Braintree] The SSL Certificate for the Production environment will expire on 2012-01-08. Please check for an updated client library.
jruby -S gem install warbler --version ">= 1.2.1"
System.java:-2:in `arraycopy': java.lang.ArrayIndexOutOfBoundsException
from DefaultResolver.java:111:in `makeTime'
from DefaultResolver.java:277:in `create'
from DefaultResolver.java:317:in `handleScalar'
from DefaultResolver.java:435:in `orgHandler'
from DefaultResolver.java:455:in `node_import'
from org/yecht/ruby/DefaultResolver$s_method_1_0$RUBYINVOKER$node_import.gen:-1:in `call'
from CachingCallSite.java:147:in `call'
from RubyLoadHandler.java:39:in `handle'
from Parser.java:300:in `addNode'
from DefaultYAMLParser.java:676:in `yyparse'
from Parser.java:290:in `yechtparse'
from Parser.java:284:in `parse'
from YParser.java:152:in `load'
from org/yecht/ruby/YParser$s_method_0_1$RUBYINVOKER$load.gen:-1:in `call'
from JavaMethod.java:623:in `call'
from DynamicMethod.java:176:in `call'
from CachingCallSite.java:310:in `cacheAndCall'
from CachingCallSite.java:149:in `call'
from CallOneArgNode.java:57:in `interpret'
from LocalAsgnNode.java:123:in `interpret'
from NewlineNode.java:104:in `interpret'
from InterpretedMethod.java:173:in `call'
from DefaultMethod.java:169:in `call'
from CachingCallSite.java:310:in `cacheAndCall'
from CachingCallSite.java:149:in `call'
from CallOneArgNode.java:57:in `interpret'
from LocalAsgnNode.java:123:in `interpret'
from NewlineNode.java:104:in `interpret'
from BlockNode.java:71:in `interpret'
from InterpretedMethod.java:173:in `call'
from DefaultMethod.java:169:in `call'
from CachingCallSite.java:310:in `cacheAndCall'
from CachingCallSite.java:149:in `call'
from CallOneArgNode.java:57:in `interpret'
from NewlineNode.java:104:in `interpret'
from RescueNode.java:225:in `executeBody'
from RescueNode.java:147:in `interpretWithJavaExceptions'
from RescueNode.java:110:in `interpret'
from InterpretedMethod.java:173:in `call'
from DefaultMethod.java:169:in `call'
from CachingCallSite.java:310:in `cacheAndCall'
from CachingCallSite.java:149:in `call'
from FCallOneArgNode.java:36:in `interpret'
from InstAsgnNode.java:95:in `interpret'
from NewlineNode.java:104:in `interpret'
from BlockNode.java:71:in `interpret'
from EnsureNode.java:96:in `interpret'
from BeginNode.java:83:in `interpret'
from NewlineNode.java:104:in `interpret'
from WhenOneArgNode.java:36:in `whenSlowTest'
from WhenOneArgNode.java:46:in `when'
from CaseNode.java:133:in `interpret'
from NewlineNode.java:104:in `interpret'
from InterpretedBlock.java:317:in `evalBlockBody'
from InterpretedBlock.java:268:in `yield'
from Block.java:194:in `yield'
from YieldNode.java:112:in `interpret'
from NewlineNode.java:104:in `interpret'
from BlockNode.java:71:in `interpret'
from InterpretedBlock.java:317:in `evalBlockBody'
from InterpretedBlock.java:268:in `yield'
from Block.java:194:in `yield'
from RubyKernel.java:1182:in `loop_1_9'
from org/jruby/RubyKernel$s_method_0_0$RUBYFRAMEDINVOKER$loop_1_9.gen:-1:in `call'
from CachingCallSite.java:300:in `cacheAndCall'
from CachingCallSite.java:118:in `callBlock'
from CachingCallSite.java:133:in `callIter'
from FCallNoArgBlockNode.java:32:in `interpret'
from NewlineNode.java:104:in `interpret'
from InterpretedMethod.java:155:in `call'
from DefaultMethod.java:161:in `call'
from CachingCallSite.java:300:in `cacheAndCall'
from CachingCallSite.java:118:in `callBlock'
from CachingCallSite.java:123:in `call'
from CallNoArgBlockNode.java:64:in `interpret'
from NewlineNode.java:104:in `interpret'
from BlockNode.java:71:in `interpret'
from InterpretedMethod.java:229:in `call'
from DefaultMethod.java:193:in `call'
from CachingCallSite.java:340:in `cacheAndCall'
from CachingCallSite.java:198:in `callBlock'
from CachingCallSite.java:203:in `call'
from RubyClass.java:720:in `call'
from DynamicMethod.java:184:in `call'
from WrapperMethod.java:62:in `call'
from CachingCallSite.java:330:in `cacheAndCall'
from CachingCallSite.java:189:in `call'
from FCallTwoArgNode.java:38:in `interpret'
from LocalAsgnNode.java:123:in `interpret'
from NewlineNode.java:104:in `interpret'
from BlockNode.java:71:in `interpret'
from EnsureNode.java:96:in `interpret'
from InterpretedMethod.java:229:in `call'
from DefaultMethod.java:193:in `call'
from CachingCallSite.java:340:in `cacheAndCall'
from CachingCallSite.java:198:in `callBlock'
from CachingCallSite.java:203:in `call'
from CallTwoArgBlockPassNode.java:62:in `interpret'
from NewlineNode.java:104:in `interpret'
from BlockNode.java:71:in `interpret'
from InterpretedMethod.java:266:in `call'
from DefaultMethod.java:209:in `call'
from CachingCallSite.java:360:in `cacheAndCall'
from CachingCallSite.java:238:in `callBlock'
from CachingCallSite.java:253:in `callIter'
from CallThreeArgBlockNode.java:64:in `interpret'
from NewlineNode.java:104:in `interpret'
from BlockNode.java:71:in `interpret'
from InterpretedMethod.java:247:in `call'
from DefaultMethod.java:201:in `call'
from CachingCallSite.java:350:in `cacheAndCall'
from CachingCallSite.java:229:in `call'
from FCallThreeArgNode.java:40:in `interpret'
from LocalAsgnNode.java:123:in `interpret'
from NewlineNode.java:104:in `interpret'
from InterpretedBlock.java:317:in `evalBlockBody'
from InterpretedBlock.java:268:in `yield'
from Block.java:194:in `yield'
from RubyIO.java:1067:in `open'
from RubyKernel.java:284:in `open'
from org/jruby/RubyKernel$s_method_0_2$RUBYFRAMEDINVOKER$open.gen:-1:in `call'
from DynamicMethod.java:188:in `call'
from CachingCallSite.java:340:in `cacheAndCall'
from CachingCallSite.java:198:in `callBlock'
from CachingCallSite.java:213:in `callIter'
from FCallTwoArgBlockNode.java:34:in `interpret'
from NewlineNode.java:104:in `interpret'
from IfNode.java:119:in `interpret'
from NewlineNode.java:104:in `interpret'
from BlockNode.java:71:in `interpret'
from InterpretedMethod.java:210:in `call'
from DefaultMethod.java:185:in `call'
from CachingCallSite.java:330:in `cacheAndCall'
from CachingCallSite.java:189:in `call'
from CallTwoArgNode.java:59:in `interpret'
from InstAsgnNode.java:95:in `interpret'
from NewlineNode.java:104:in `interpret'
from RescueNode.java:225:in `executeBody'
from RescueNode.java:147:in `interpretWithJavaExceptions'
from RescueNode.java:110:in `interpret'
from BeginNode.java:83:in `interpret'
from NewlineNode.java:104:in `interpret'
from BlockNode.java:71:in `interpret'
from InterpretedMethod.java:229:in `call'
from DefaultMethod.java:193:in `call'
from CachingCallSite.java:340:in `cacheAndCall'
from CachingCallSite.java:198:in `callBlock'
from CachingCallSite.java:203:in `call'
from RubyClass.java:720:in `call'
from DynamicMethod.java:184:in `call'
from CachingCallSite.java:330:in `cacheAndCall'
from CachingCallSite.java:189:in `call'
from CallTwoArgNode.java:59:in `interpret'
from DAsgnNode.java:110:in `interpret'
from NewlineNode.java:104:in `interpret'
from BlockNode.java:71:in `interpret'
from InterpretedBlock.java:317:in `evalBlockBody'
from InterpretedBlock.java:268:in `yield'
from Block.java:194:in `yield'
from RubyArray.java:1635:in `eachCommon'
from RubyArray.java:1642:in `each'
from org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen:-1:in `call'
from CachingCallSite.java:300:in `cacheAndCall'
from CachingCallSite.java:118:in `callBlock'
from CachingCallSite.java:123:in `call'
from CallNoArgBlockNode.java:64:in `interpret'
from NewlineNode.java:104:in `interpret'
from BlockNode.java:71:in `interpret'
from InterpretedMethod.java:210:in `call'
from DefaultMethod.java:185:in `call'
from CachingCallSite.java:330:in `cacheAndCall'
from CachingCallSite.java:189:in `call'
from CallTwoArgNode.java:59:in `interpret'
from NewlineNode.java:104:in `interpret'
from BlockNode.java:71:in `interpret'
from RescueNode.java:225:in `executeBody'
from RescueNode.java:147:in `interpretWithJavaExceptions'
from RescueNode.java:110:in `interpret'
from BeginNode.java:83:in `interpret'
from NewlineNode.java:104:in `interpret'
from InterpretedBlock.java:317:in `evalBlockBody'
from InterpretedBlock.java:268:in `yield'
from Block.java:194:in `yield'
from RubyArray.java:1635:in `eachCommon'
from RubyArray.java:1642:in `each'
from org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen:-1:in `call'
from CachingCallSite.java:300:in `cacheAndCall'
from CachingCallSite.java:118:in `callBlock'
from CachingCallSite.java:123:in `call'
from CallNoArgBlockNode.java:64:in `interpret'
from NewlineNode.java:104:in `interpret'
from BlockNode.java:71:in `interpret'
from InterpretedMethod.java:136:in `call'
from DefaultMethod.java:153:in `call'
from CachingCallSite.java:290:in `cacheAndCall'
from CachingCallSite.java:109:in `call'
from VCallNode.java:85:in `interpret'
from NewlineNode.java:104:in `interpret'
from IfNode.java:119:in `interpret'
from IfNode.java:119:in `interpret'
from NewlineNode.java:104:in `interpret'
from BlockNode.java:71:in `interpret'
from InterpretedMethod.java:247:in `call'
from DefaultMethod.java:201:in `call'
from CachingCallSite.java:350:in `cacheAndCall'
from CachingCallSite.java:229:in `call'
from CallSpecialArgNode.java:71:in `interpret'
from NewlineNode.java:104:in `interpret'
from BlockNode.java:71:in `interpret'
from CaseNode.java:138:in `interpret'
from NewlineNode.java:104:in `interpret'
from BlockNode.java:71:in `interpret'
from InterpretedMethod.java:173:in `call'
from DefaultMethod.java:169:in `call'
from CachingCallSite.java:310:in `cacheAndCall'
from CachingCallSite.java:149:in `call'
from FCallOneArgNode.java:36:in `interpret'
from NewlineNode.java:104:in `interpret'
from RescueNode.java:225:in `executeBody'
from RescueNode.java:147:in `interpretWithJavaExceptions'
from RescueNode.java:110:in `interpret'
from InterpretedMethod.java:173:in `call'
from DefaultMethod.java:169:in `call'
from CachingCallSite.java:310:in `cacheAndCall'
from CachingCallSite.java:149:in `call'
from CallOneArgNode.java:57:in `interpret'
from NewlineNode.java:104:in `interpret'
from BlockNode.java:71:in `interpret'
from InterpretedMethod.java:173:in `call'
from DefaultMethod.java:169:in `call'
from CachingCallSite.java:310:in `cacheAndCall'
from CachingCallSite.java:149:in `call'
from gem:24:in `rescue_1$RUBY$__rescue___0'
from gem:23:in `__file__'
from gem:-1:in `load'
from Ruby.java:628:in `runScript'
from Ruby.java:550:in `runNormally'
from Ruby.java:396:in `runFromMain'
from Main.java:272:in `run'
from Main.java:117:in `run'
from Main.java:97:in `main'
I also tried jruby -S gem install warbler -v 1.2.1, and jgem install warbler -v 1.2.1
With the same result
The first line of the error message says:
tlb rake task creation failed!, make sure you have installed the tlb-rspec1 gem
Have you tried doing this?
This sounds like a bug in yecht. It may be this one: http://bug.jruby.org/5581 (Though it is rather strange that you are getting this in 1.4.0.)
There are a couple of options, assuming that you are stuck with JRuby 1.4.0:
Check out yecht source from https://github.com/olabini/yecht, build yecht.jar, insert it into JRuby 1.4.0 source's lib/ruby/site_ruby/shared/yecht.jar, and rebuild jruby.jar. This might (or might not) get you JRuby 1.4.0 with the fix.
Try Bundler. It might work with Rails 2.3.4: http://gembundler.com/rails23.html
Related
I want to turn this raw sql statement into an ActiveRecord statement:
def self.get_new_entry_code(table_id)
sql = "SELECT coalesce(max(code_id) + 1, 1) FROM configentries WHERE configtable_id = " + table_id.to_s
connection.execute(sql)
end
I'm struggling with the coalesce(). I tried the following:
def self.get_new_entry_code(table_id)
result = Configentry.select("coalesce(max(code_id) + 1, 1").where("configtable_id = " + table_id.to_s).first
result.id
end
But this is not working and too "raw" as well. How can I accomplish this?
What I noticed now is, it's only giving an error when I put puts result. How can this be?
Error:
E, [2017-05-10T12:30:04.604953 #93397] ERROR -- : PG::SyntaxError: ERROR: syntax error at or near "FROM"
LINE 1: ...e(max(code_id) + 1, 1) WHERE configtable_id = 106 FROM "conf...
^
: SELECT coalesce(max(code_id) + 1, 1) WHERE configtable_id = 106 FROM "configentries" ORDER BY "configentries"."id" ASC LIMIT 1
2017-05-10 12:30:04 - ActiveRecord::StatementInvalid - PG::SyntaxError: ERROR: syntax error at or near "FROM"
LINE 1: ...e(max(code_id) + 1, 1) WHERE configtable_id = 106 FROM "conf...
^
: SELECT coalesce(max(code_id) + 1, 1) WHERE configtable_id = 106 FROM "configentries" ORDER BY "configentries"."id" ASC LIMIT 1:
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/connection_adapters/postgresql_adapter.rb:822:in `async_exec'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/connection_adapters/postgresql_adapter.rb:822:in `block in exec_no_cache'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/connection_adapters/abstract_adapter.rb:378:in `block in log'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.1.16/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/connection_adapters/abstract_adapter.rb:372:in `log'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/connection_adapters/postgresql_adapter.rb:822:in `exec_no_cache'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/connection_adapters/postgresql/database_statements.rb:137:in `exec_query'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/connection_adapters/postgresql_adapter.rb:954:in `select'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/connection_adapters/abstract/database_statements.rb:24:in `select_all'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/connection_adapters/abstract/query_cache.rb:70:in `select_all'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/querying.rb:39:in `find_by_sql'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/relation.rb:611:in `exec_queries'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/relation.rb:493:in `load'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/relation.rb:238:in `to_a'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/relation/finder_methods.rb:474:in `find_nth_with_limit'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/relation/finder_methods.rb:468:in `find_nth'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/relation/finder_methods.rb:132:in `first'
/Users/ndinatale/leanlogic-qa-prototype/server/models/device_configentry.rb:92:in `get_new_entry_code'
/Users/ndinatale/leanlogic-qa-prototype/server/lib/models_base.rb:82:in `merge_data'
/Users/ndinatale/leanlogic-qa-prototype/server/routes/02_rest_misc.rb:298:in `block (2 levels) in <top (required)>'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/transactions.rb:208:in `transaction'
/Users/ndinatale/leanlogic-qa-prototype/server/routes/02_rest_misc.rb:297:in `block in <top (required)>'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in `call'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in `block in compile!'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `[]'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `block (3 levels) in route!'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:994:in `route_eval'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `block (2 levels) in route!'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1015:in `block in process_route'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in `catch'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in `process_route'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:973:in `block in route!'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in `each'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in `route!'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1085:in `block in dispatch!'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `block in invoke'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `catch'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `invoke'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1082:in `dispatch!'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in `block in call!'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `block in invoke'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `catch'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `invoke'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in `call!'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:895:in `call'
/Library/Ruby/Gems/2.0.0/gems/rack-1.6.5/lib/rack/session/abstract/id.rb:225:in `context'
/Library/Ruby/Gems/2.0.0/gems/rack-1.6.5/lib/rack/session/abstract/id.rb:220:in `call'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.1.16/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
/Library/Ruby/Gems/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in `call'
/Library/Ruby/Gems/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in `call'
/Library/Ruby/Gems/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in `call'
/Library/Ruby/Gems/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
/Library/Ruby/Gems/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
/Library/Ruby/Gems/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
/Library/Ruby/Gems/2.0.0/gems/rack-1.6.5/lib/rack/nulllogger.rb:9:in `call'
/Library/Ruby/Gems/2.0.0/gems/rack-1.6.5/lib/rack/head.rb:13:in `call'
/Library/Ruby/Gems/2.0.0/gems/rack-1.6.5/lib/rack/methodoverride.rb:22:in `call'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/show_exceptions.rb:25:in `call'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:182:in `call'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:2013:in `call'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in `block in call'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1785:in `synchronize'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1785:in `synchronize'
/Library/Ruby/Gems/2.0.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in `call'
/Library/Ruby/Gems/2.0.0/gems/puma-3.8.2/lib/puma/configuration.rb:224:in `call'
/Library/Ruby/Gems/2.0.0/gems/puma-3.8.2/lib/puma/server.rb:600:in `handle_request'
/Library/Ruby/Gems/2.0.0/gems/puma-3.8.2/lib/puma/server.rb:435:in `process_client'
/Library/Ruby/Gems/2.0.0/gems/puma-3.8.2/lib/puma/server.rb:299:in `block in run'
/Library/Ruby/Gems/2.0.0/gems/puma-3.8.2/lib/puma/thread_pool.rb:120:in `call'
/Library/Ruby/Gems/2.0.0/gems/puma-3.8.2/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
You have syntax error
You have missed one closing bracket after coalesce(max(code_id) + 1, 1)
Configentry.select("coalesce(max(code_id) + 1, 1)").find_by(configtable_id: table_id)
Also, Prefer find_by over where().first
I am getting an error with this code, but I can not figure out how the name method is being called.
file_controller.rb:
91| def destroy
92| r = Module::Model.find(params[:id])
93| r.parts.each{|p| p.destroy }
94| r.destroy
95| render :nothing => true, :status => 200
96| end
The error is being thrown on the "r.destroy" line.
Here is the error:
!! There was an error ( > _ < )
!!
!! Params: {"action"=>"destroy", "controller"=>"module/controller", "id"=>"7156"}
!!
!! ERROR !!
!! NoMethodError
!!
!! /path/to/file_controller.rb:94:in `destroy'
!! undefined method `name' for nil:NilClass
!!
Additionally Requested:
class Scheduling::TimeOffRequest < Scheduling::Connection
include Logged
self.table_name = 'time_off_requests'
has_many :parts, dependent: :destroy
belongs_to :employee
belongs_to :type, foreign_key: 'request_type_id'
belongs_to :state, foreign_key: 'request_state_id'
#****************************************************************************
module STATE
PEND = 1
DENY = 2
APPROVE = 3
APPROVE_MOD = 4
end
#****************************************************************************
def self.display
mysql.query
end
end
Stack Trace:
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/associations/has_many_association.rb:80:in `cached_counter_attribute_name'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/associations/has_many_association.rb:103:in `inverse_updates_counter_cache?'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/associations/has_many_association.rb:113:in `delete_records'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/associations/collection_association.rb:493:in `remove_records'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/associations/collection_association.rb:486:in `block in delete_or_destroy'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/associations/collection_association.rb:152:in `block in transaction'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/database_statements.rb:200:in `transaction'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/proxy.rb:253:in `block in transaction'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/proxy.rb:226:in `block (2 levels) in run_queries_on_shard'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/proxy.rb:476:in `using_shard'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/proxy.rb:225:in `block in run_queries_on_shard'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/proxy.rb:462:in `keeping_connection_proxy'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/proxy.rb:224:in `run_queries_on_shard'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/proxy.rb:252:in `transaction'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/transactions.rb:209:in `transaction'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/associations/collection_association.rb:151:in `transaction'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/associations/collection_association.rb:486:in `delete_or_destroy'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/associations/collection_association.rb:247:in `destroy'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/associations/collection_association.rb:170:in `destroy_all'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/associations/has_many_association.rb:26:in `handle_dependency'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/associations/builder/association.rb:97:in `has_many_dependent_for_parts'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:387:in `_run__2188473118504979458__destroy__callbacks'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:80:in `run_callbacks'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/callbacks.rb:289:in `destroy'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/transactions.rb:265:in `block in destroy'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/transactions.rb:326:in `block in with_transaction_returning_status'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/database_statements.rb:202:in `block in transaction'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/database_statements.rb:210:in `within_new_transaction'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/database_statements.rb:202:in `transaction'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/proxy.rb:253:in `block in transaction'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/proxy.rb:226:in `block (2 levels) in run_queries_on_shard'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/proxy.rb:476:in `using_shard'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/proxy.rb:225:in `block in run_queries_on_shard'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/proxy.rb:462:in `keeping_connection_proxy'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/proxy.rb:224:in `run_queries_on_shard'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/proxy.rb:252:in `transaction'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/transactions.rb:209:in `transaction'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/transactions.rb:323:in `with_transaction_returning_status'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/transactions.rb:265:in `destroy'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/persistence.rb:25:in `block in destroy'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/proxy.rb:226:in `block (2 levels) in run_queries_on_shard'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/proxy.rb:476:in `using_shard'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/proxy.rb:225:in `block in run_queries_on_shard'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/proxy.rb:462:in `keeping_connection_proxy'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/proxy.rb:224:in `run_queries_on_shard'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/shard_tracking.rb:30:in `run_on_shard'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/ar-octopus-0.8.5/lib/octopus/persistence.rb:25:in `destroy'
!! /var/www/projects/releases/1435700629/app/controllers/scheduling/pto_controller.rb:94:in `destroy'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/abstract_controller/base.rb:189:in `process_action'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_controller/metal/rendering.rb:10:in `process_action'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:423:in `_run__1437761400294135477__process_action__callbacks'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:80:in `run_callbacks'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/abstract_controller/callbacks.rb:17:in `process_action'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_controller/metal/rescue.rb:29:in `process_action'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `block in instrument'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `instrument'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/abstract_controller/base.rb:136:in `process'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/abstract_controller/rendering.rb:44:in `process'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_controller/metal.rb:195:in `dispatch'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_controller/metal.rb:231:in `block in action'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:80:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:48:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/journey/router.rb:71:in `block in call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/journey/router.rb:59:in `each'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/journey/router.rb:59:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:655:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/rack/agent_hooks.rb:30:in `traced_call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/rack/browser_monitoring.rb:32:in `traced_call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/rack-1.5.5/lib/rack/deflater.rb:25:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/rack-1.5.5/lib/rack/etag.rb:23:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/rack-1.5.5/lib/rack/conditionalget.rb:35:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/rack-1.5.5/lib/rack/head.rb:11:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/flash.rb:241:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/rack-1.5.5/lib/rack/session/abstract/id.rb:225:in `context'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/rack-1.5.5/lib/rack/session/abstract/id.rb:220:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/cookies.rb:486:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/query_cache.rb:36:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:373:in `_run__607729009339104246__call__callbacks'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:80:in `run_callbacks'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/airbrake-4.3.0/lib/airbrake/rails/middleware.rb:13:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/railties-4.0.0/lib/rails/rack/logger.rb:38:in `call_app'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/railties-4.0.0/lib/rails/rack/logger.rb:21:in `block in call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:67:in `block in tagged'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:25:in `tagged'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:67:in `tagged'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/railties-4.0.0/lib/rails/rack/logger.rb:21:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/request_id.rb:21:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/rack-1.5.5/lib/rack/methodoverride.rb:21:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/rack-1.5.5/lib/rack/runtime.rb:17:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activesupport-4.0.0/lib/active_support/cache/strategy/local_cache.rb:83:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/ssl.rb:24:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/airbrake-4.3.0/lib/airbrake/user_informer.rb:16:in `_call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/airbrake-4.3.0/lib/airbrake/user_informer.rb:12:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/railties-4.0.0/lib/rails/engine.rb:511:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/railties-4.0.0/lib/rails/application.rb:97:in `call'
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/newrelic_rpm-3.12.0.288/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
!! /usr/local/rvm/ge/2.2.2/gems/passenger-5.0.6/lib/phusion_passenger/rack/thread_handler_extension.rb:85:in `process_request'
!! /usr/local/rvm/ge/2.2.2/gems/passenger-5.0.6/lib/phusion_passenger/request_handler/thread_handler.rb:155:in `accept_and_process_next_request'
!! /usr/local/rvm/ge/2.2.2/gems/passenger-5.0.6/lib/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop'
!! /usr/local/rvm/ge/2.2.2/gems/passenger-5.0.6/lib/phusion_passenger/request_handler.rb:414:in `block (3 levels) in start_threads'
!! /usr/local/rvm/ge/2.2.2/gems/passenger-5.0.6/lib/phusion_passenger/utils.rb:111:in `block in create_thread_and_abort_on_exception'
Is anyone able to answer why #destroy is calling #name?
Now I get it, its not a callback issue. This is an issue with ActiveRecord and Ruby 2.2
You can fix it by switching the ruby version from ruby-2.2.0 to ruby-2.1.3 or rails version from 4.0.0 to 4.1.2
Check this SO link
aha!
!! /var/www/projects/shared/bundle/ruby/2.2.0/gems/activerecord-4.0.0/lib/active_record/associations/has_many_association.rb:80:in `cached_counter_attribute_name'
told you it was a callback :)
counter_cache sets up a callback to update a field when an associated record changes. Presumably you've got a counter_cache or similar call in one of the associated models? Something about the way this is set up assumes that the model that's just been deleted is still there. Are you doing counter_cache anywhere? If so then add the code for it to your question please.
I am getting the above error and it says that it has to do with the "+". Please note I did not code the below page, but I was told to fix it. If someone could help that would be awesome.
MYMOH Controller
210. def sponsorships
211. dbdc_client.materialize("cv__Recurring_Gift__c")
212. ##gifts =Cv__Recurring_Gift__c.find_all_by_cv__Contact__c(current_user.convio_id)
213. #gifts = Cv__Recurring_Gift__c.query("cv__Contact__c = '" + current_user.convio_id + "' AND Child_Status__c = 'Sponsored' and cv__Recurring_Gift_Status__c='Active'")
214. #account = Contact.find_by_Id(current_user.convio_id)
215. ##old_sponsorships = Child_Sponsorship__c.query("Sponsor__c = '" + current_user.convio_id + "' AND Status__c = 'Open'")
216. #sponsorships = #gifts # + #old_sponsorships
217. unless #sponsorships.nil?
218. #if we find sponsorships
219. #children = []
220. #sponsorships.each do | spons |
221. #photo = nil
222. unless spons.Child__c.nil?
223. #child = Child__c.find_by_Id(spons.Child__c)
224. #photoTest = Picture__c.query("Child__c='" + #child.Id + "' and Primary__c=true").first
225. #photo = #photoTest.Photo__c if #photoTest
226. if #photo.nil?
227. #attachment = Attachment.find_by_ParentId(#child.Id)
228. #photo = "<img src='https://c.na12.content.force.com/servlet/servlet.FileDownload?file=" + #attachment.Id.to_s + "' />" unless #attachment.nil?
end
#set an unused variable to carry the photo url
#child.LastModifiedById = #photo
#add child to array of children
#children << #child
end
end
end
end
FULL TRACE
app/controllers/mymoh_controller.rb:213:in `+'
app/controllers/mymoh_controller.rb:213:in `sponsorships'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/abstract_controller/base.rb:167:in `process_action'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_controller/metal/rendering.rb:10:in `process_action'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:425:in `_run__3687996442544047678__process_action__3216127983448203575__callbacks'
vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:405:in `__run_callback'
vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/abstract_controller/callbacks.rb:17:in `process_action'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_controller/metal/rescue.rb:29:in `process_action'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.11/lib/active_support/notifications.rb:123:in `block in instrument'
vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.11/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.11/lib/active_support/notifications.rb:123:in `instrument'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.11/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/rails3/action_controller.rb:23:in `block in process_action'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:353:in `perform_action_with_newrelic_trace'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/rails3/action_controller.rb:22:in `process_action'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/abstract_controller/base.rb:121:in `process'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/abstract_controller/rendering.rb:45:in `process'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_controller/metal.rb:203:in `dispatch'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_controller/metal.rb:246:in `block in action'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_dispatch/routing/route_set.rb:73:in `call'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_dispatch/routing/route_set.rb:36:in `call'
vendor/bundle/ruby/2.1.0/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
vendor/bundle/ruby/2.1.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
vendor/bundle/ruby/2.1.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_dispatch/routing/route_set.rb:601:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/rack/agent_hooks.rb:30:in `traced_call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/rack/browser_monitoring.rb:23:in `traced_call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/exception_notification-4.0.0/lib/exception_notification/rack.rb:28:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/conditionalget.rb:25:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_dispatch/middleware/head.rb:14:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_dispatch/middleware/flash.rb:242:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context'
vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_dispatch/middleware/cookies.rb:341:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.11/lib/active_record/query_cache.rb:64:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:405:in `_run__790379348702901205__call__4407048364405463113__callbacks'
vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:405:in `__run_callback'
vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/railties-3.2.11/lib/rails/rack/logger.rb:32:in `call_app'
vendor/bundle/ruby/2.1.0/gems/railties-3.2.11/lib/rails/rack/logger.rb:16:in `block in call'
vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.11/lib/active_support/tagged_logging.rb:22:in `tagged'
vendor/bundle/ruby/2.1.0/gems/railties-3.2.11/lib/rails/rack/logger.rb:16:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_dispatch/middleware/request_id.rb:22:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.11/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.11/lib/action_dispatch/middleware/static.rb:62:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch'
vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup'
vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!'
vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/rack-timeout-0.2.4/lib/rack/timeout.rb:108:in `call'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/railties-3.2.11/lib/rails/engine.rb:479:in `call'
vendor/bundle/ruby/2.1.0/gems/railties-3.2.11/lib/rails/application.rb:223:in `call'
vendor/bundle/ruby/2.1.0/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in `method_missing'
vendor/bundle/ruby/2.1.0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/content_length.rb:14:in `call'
vendor/bundle/ruby/2.1.0/gems/railties-3.2.11/lib/rails/rack/log_tailer.rb:17:in `call'
vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/thin/connection.rb:86:in `block in pre_process'
vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/thin/connection.rb:84:in `catch'
vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/thin/connection.rb:84:in `pre_process'
vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/thin/connection.rb:53:in `process'
vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/thin/connection.rb:39:in `receive_data'
vendor/bundle/ruby/2.1.0/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run_machine'
vendor/bundle/ruby/2.1.0/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run'
vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/thin/backends/base.rb:73:in `start'
vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/thin/server.rb:162:in `start'
vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/handler/thin.rb:13:in `run'
vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/server.rb:268:in `start'
vendor/bundle/ruby/2.1.0/gems/railties-3.2.11/lib/rails/commands/server.rb:70:in `start'
vendor/bundle/ruby/2.1.0/gems/railties-3.2.11/lib/rails/commands.rb:55:in `block in <top (required)>'
vendor/bundle/ruby/2.1.0/gems/railties-3.2.11/lib/rails/commands.rb:50:in `tap'
vendor/bundle/ruby/2.1.0/gems/railties-3.2.11/lib/rails/commands.rb:50:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'
#pref is not declared as a string just by assigning it " ".
Try this:
preferences = String.new
if !params[:prefgirl].nil?
preferences = preferences + "Girl,"
end
.
.
.
#preferences = preferences
Thanks for posting the code. If the stack trace is pointing to the right place, the error is here, where you're building a string like this:
"cv__Contact__c = '" + current_user.convio_id + "' AND Child_Status__c = 'Sponsored' and cv__Recurring_Gift_Status__c='Active'"
If current_user.convio_id is nil, you will get the error you cite. You should think about either guarding against current_user.convio_id being nil, or how that query should be built if it is.
A more Rubyish way to build that string, by the way, is using interpolation:
"cv__Contact__c = '#{current_user.convio_id}' AND Child_Status__c = 'Sponsored' and cv__Recurring_Gift_Status__c='Active'"
The error specifically means that current_user.convio_id is nil, and Ruby will not convert nil to a string without being told directly to. The + concatenates strings if the object on the left side is a string.
It seems that your whole sponsorship action depends on the user having a convio_id If that is a field that all users should have you should add a not null attribute to it, and go through and add one to all that don't have one currently.
If a convio_id is an optional thing you should check at the beginning of the action if they have one ex-
def sponsorships
if current_user.convio_id.nil?
flash[:convio_id] = "User has no Convio ID" # optional message saying why we're redirecting
redirect_to <somewhere else> and return
end
<rest of the code here>
To add a field as required in Ruby, ignoring the database, you would need to add this line in to your model, probably app/models/user.rb
class User < ActiveRecord::Base
...
validates :convio_id, presence: true
...
end
This will make it so all users created through the website must have a convio_id to be valid and saved.
My production server is Ubuntu 12.
I'm using Devise + OmniAuth to handle the Google authentication.
But when Google returns a control to my application I get an error "Network is unreachable".
I assume it's because of server is behind the proxy.
Here's error description:
-------------------------------
Request:
-------------------------------
* URL : http://efiling.uipv.org/users/auth/google_oauth2/callback?state=f4eaca9fbed2a77c0baac50cdbdccab7eee671179bb8fc43&code=4/YRcyYZzkrfNh8mEBbenxaxyx5EjN.4snirEA-93MXOl05ti8ZT3a9mXdIcgI
* IP address: 213.160.144.239
* Parameters: {"state"=>"f4eaca9fbed2a77c0baac50cdbdccab7eee671179bb8fc43", "code"=>"4/YRcyYZzkrfNh8mEBbenxaxyx5EjN.4snirEA-93MXOl05ti8ZT3a9mXdIcgI"}
* Rails root: /home/test/efiling2
* Timestamp : 2012-08-14 11:22:27 +0300
-------------------------------
Session:
-------------------------------
* session id: "5b45534889547514b01f59e39f21f74a"
* data: {"session_id"=>"5b45534889547514b01f59e39f21f74a",
"_csrf_token"=>"GJAFgiVO3zd/INIW6DqDh/VYGlvoZ8WuEKAX1HseJwA="}
-------------------------------
Environment:
-------------------------------
* CONTENT_LENGTH : 0
* DOCUMENT_ROOT : /home/test/efiling2/public
* HTTP_ACCEPT : text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
* HTTP_ACCEPT_ENCODING : gzip, deflate
* HTTP_ACCEPT_LANGUAGE : ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3
* HTTP_CACHE_CONTROL : max-age=0
* HTTP_CONNECTION : keep-alive
* HTTP_COOKIE : _eFiling2_session=BAh7CkkiD3Nlc3Npb25faWQGOgZFRiIlNWI0NTUzNDg4OTU0NzUxNGIwMWY1OWUzOWYyMWY3NGFJIhBfY3NyZl90b2tlbgY7AEZJIjFHSkFGZ2lWTzN6ZC9JTklXNkRxRGgvVllHbHZvWjhXdUVLQVgxSHNlSndBPQY7AEZJIhRvbW5pYXV0aC5wYXJhbXMGOwBGewBJIhRvbW5pYXV0aC5vcmlnaW4GOwBGIidodHRwOi8vZWZpbGluZy51aXB2Lm9yZy8%2FbG9jYWxlPXVrSSITb21uaWF1dGguc3RhdGUGOwBGIjVmNGVhY2E5ZmJlZDJhNzdjMGJhYWM1MGNkYmRjY2FiN2VlZTY3MTE3OWJiOGZjNDM%3D--08b5e8bcf347ac5c845922cbf85f31a24907c100
* HTTP_HOST : efiling.uipv.org
* HTTP_USER_AGENT : Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20100101 Firefox/14.0.1
* HTTP_VIA : 1.1 proxy.ukrpatent.org (squid/3.1.19)
* HTTP_X_FORWARDED_FOR : 10.11.10.56
* PASSENGER_APP_SPAWNER_IDLE_TIME : -1
* PASSENGER_APP_TYPE : rack
* PASSENGER_CONNECT_PASSWORD : [FILTERED]
* PASSENGER_DEBUGGER : false
* PASSENGER_ENVIRONMENT : development
* PASSENGER_FRAMEWORK_SPAWNER_IDLE_TIME : -1
* PASSENGER_FRIENDLY_ERROR_PAGES : true
* PASSENGER_GROUP :
* PASSENGER_MAX_REQUESTS : 0
* PASSENGER_MIN_INSTANCES : 1
* PASSENGER_SHOW_VERSION_IN_HEADER : true
* PASSENGER_SPAWN_METHOD : smart-lv2
* PASSENGER_USER :
* PASSENGER_USE_GLOBAL_QUEUE : true
* PATH_INFO : /users/auth/google_oauth2/callback
* QUERY_STRING : state=f4eaca9fbed2a77c0baac50cdbdccab7eee671179bb8fc43&code=4/YRcyYZzkrfNh8mEBbenxaxyx5EjN.4snirEA-93MXOl05ti8ZT3a9mXdIcgI
* REMOTE_ADDR : 213.160.144.239
* REMOTE_PORT : 62175
* REQUEST_METHOD : GET
* REQUEST_URI : /users/auth/google_oauth2/callback?state=f4eaca9fbed2a77c0baac50cdbdccab7eee671179bb8fc43&code=4/YRcyYZzkrfNh8mEBbenxaxyx5EjN.4snirEA-93MXOl05ti8ZT3a9mXdIcgI
* SCGI : 1
* SCRIPT_NAME :
* SERVER_ADDR : 10.10.18.3
* SERVER_NAME : efiling.uipv.org
* SERVER_PORT : 80
* SERVER_PROTOCOL : HTTP/1.1
* SERVER_SOFTWARE : nginx/1.2.2
* UNION_STATION_SUPPORT : false
* _ : _
* action_dispatch.cookies : {"_eFiling2_session"=>"BAh7CkkiD3Nlc3Npb25faWQGOgZFRiIlNWI0NTUzNDg4OTU0NzUxNGIwMWY1OWUzOWYyMWY3NGFJIhBfY3NyZl90b2tlbgY7AEZJIjFHSkFGZ2lWTzN6ZC9JTklXNkRxRGgvVllHbHZvWjhXdUVLQVgxSHNlSndBPQY7AEZJIhRvbW5pYXV0aC5wYXJhbXMGOwBGewBJIhRvbW5pYXV0aC5vcmlnaW4GOwBGIidodHRwOi8vZWZpbGluZy51aXB2Lm9yZy8/bG9jYWxlPXVrSSITb21uaWF1dGguc3RhdGUGOwBGIjVmNGVhY2E5ZmJlZDJhNzdjMGJhYWM1MGNkYmRjY2FiN2VlZTY3MTE3OWJiOGZjNDM=--08b5e8bcf347ac5c845922cbf85f31a24907c100"}
* action_dispatch.parameter_filter : [:password, :efile, /RAW_POST_DATA/]
* action_dispatch.remote_ip : 213.160.144.239
* action_dispatch.request.content_type :
* action_dispatch.request.parameters : {"state"=>"f4eaca9fbed2a77c0baac50cdbdccab7eee671179bb8fc43", "code"=>"4/YRcyYZzkrfNh8mEBbenxaxyx5EjN.4snirEA-93MXOl05ti8ZT3a9mXdIcgI"}
* action_dispatch.request.path_parameters : {}
* action_dispatch.request.query_parameters : {"state"=>"f4eaca9fbed2a77c0baac50cdbdccab7eee671179bb8fc43", "code"=>"4/YRcyYZzkrfNh8mEBbenxaxyx5EjN.4snirEA-93MXOl05ti8ZT3a9mXdIcgI"}
* action_dispatch.request.request_parameters : {}
* action_dispatch.request.unsigned_session_cookie: {"session_id"=>"5b45534889547514b01f59e39f21f74a", "_csrf_token"=>"GJAFgiVO3zd/INIW6DqDh/VYGlvoZ8WuEKAX1HseJwA=", "omniauth.params"=>{}, "omniauth.origin"=>"http://efiling.uipv.org/?locale=uk", "omniauth.state"=>"f4eaca9fbed2a77c0baac50cdbdccab7eee671179bb8fc43"}
* action_dispatch.secret_token : f7fa3943c0fc9f3b40a9bc5b0260fa43979de183fc338c08ec96277d6aeab1ce7973c188f93e978d4a513a08d871888520f41671d06a15315ffc6c3d43a1abfa
* action_dispatch.show_exceptions : true
* exception_notifier.options : {:sender_address=>"\"Efiling\" <alex_drobazko#uipv.org>", :exception_recipients=>["drobazko#gmail.com"], :email_prefix=>"[Efiling Error Report] ", :sections=>["request", "session", "environment", "backtrace"], :background_sections=>["backtrace", "data"], :verbose_subject=>true, :normalize_subject=>false, :ignore_exceptions=>["ActiveRecord::RecordNotFound", "AbstractController::ActionNotFound", "ActionController::RoutingError"], :ignore_crawlers=>[], :ignore_if=>#<Proc:0xa55f0b4#/home/test/.rvm/gems/ruby-1.9.3-p194/gems/exception_notification-2.6.1/lib/exception_notifier.rb:30 (lambda)>}
* omniauth.origin : http://efiling.uipv.org/?locale=uk
* omniauth.params : {}
* omniauth.strategy : #<OmniAuth::Strategies::GoogleOauth2:0xafdbca4>
* rack.errors : #<IO:0x9a598f4>
* rack.input : #<PhusionPassenger::Utils::RewindableInput:0xafc2718>
* rack.multiprocess : true
* rack.multithread : false
* rack.request.cookie_hash : {"_eFiling2_session"=>"BAh7CkkiD3Nlc3Npb25faWQGOgZFRiIlNWI0NTUzNDg4OTU0NzUxNGIwMWY1OWUzOWYyMWY3NGFJIhBfY3NyZl90b2tlbgY7AEZJIjFHSkFGZ2lWTzN6ZC9JTklXNkRxRGgvVllHbHZvWjhXdUVLQVgxSHNlSndBPQY7AEZJIhRvbW5pYXV0aC5wYXJhbXMGOwBGewBJIhRvbW5pYXV0aC5vcmlnaW4GOwBGIidodHRwOi8vZWZpbGluZy51aXB2Lm9yZy8/bG9jYWxlPXVrSSITb21uaWF1dGguc3RhdGUGOwBGIjVmNGVhY2E5ZmJlZDJhNzdjMGJhYWM1MGNkYmRjY2FiN2VlZTY3MTE3OWJiOGZjNDM=--08b5e8bcf347ac5c845922cbf85f31a24907c100"}
* rack.request.cookie_string : _eFiling2_session=BAh7CkkiD3Nlc3Npb25faWQGOgZFRiIlNWI0NTUzNDg4OTU0NzUxNGIwMWY1OWUzOWYyMWY3NGFJIhBfY3NyZl90b2tlbgY7AEZJIjFHSkFGZ2lWTzN6ZC9JTklXNkRxRGgvVllHbHZvWjhXdUVLQVgxSHNlSndBPQY7AEZJIhRvbW5pYXV0aC5wYXJhbXMGOwBGewBJIhRvbW5pYXV0aC5vcmlnaW4GOwBGIidodHRwOi8vZWZpbGluZy51aXB2Lm9yZy8%2FbG9jYWxlPXVrSSITb21uaWF1dGguc3RhdGUGOwBGIjVmNGVhY2E5ZmJlZDJhNzdjMGJhYWM1MGNkYmRjY2FiN2VlZTY3MTE3OWJiOGZjNDM%3D--08b5e8bcf347ac5c845922cbf85f31a24907c100
* rack.request.query_hash : {"state"=>"f4eaca9fbed2a77c0baac50cdbdccab7eee671179bb8fc43", "code"=>"4/YRcyYZzkrfNh8mEBbenxaxyx5EjN.4snirEA-93MXOl05ti8ZT3a9mXdIcgI"}
* rack.request.query_string : state=f4eaca9fbed2a77c0baac50cdbdccab7eee671179bb8fc43&code=4/YRcyYZzkrfNh8mEBbenxaxyx5EjN.4snirEA-93MXOl05ti8ZT3a9mXdIcgI
* rack.run_once : false
* rack.session : {"session_id"=>"5b45534889547514b01f59e39f21f74a", "_csrf_token"=>"GJAFgiVO3zd/INIW6DqDh/VYGlvoZ8WuEKAX1HseJwA="}
* rack.session.options : {:path=>"/", :domain=>nil, :expire_after=>nil, :secure=>false, :httponly=>true, :id=>"5b45534889547514b01f59e39f21f74a"}
* rack.url_scheme : http
* rack.version : [1, 0]
* warden : Warden::Proxy:92171780 #config={:default_scope=>:user, :scope_defaults=>{}, :default_strategies=>{:user=>[:rememberable, :database_authenticatable]}, :intercept_401=>false, :failure_app=>#<Devise::Delegator:0xbf7cb04>}
* Process: 31617
* Server : STORK
-------------------------------
Backtrace:
-------------------------------
/home/test/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:762:in `initialize'
/home/test/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:762:in `open'
/home/test/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:762:in `block in connect'
/home/test/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/timeout.rb:54:in `timeout'
/home/test/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/timeout.rb:99:in `timeout'
/home/test/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:762:in `connect'
/home/test/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:755:in `do_start'
/home/test/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:744:in `start'
/home/test/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:1284:in `request'
rest-client (1.6.7) lib/restclient/net_http_ext.rb:51:in `request'
faraday (0.8.2) lib/faraday/adapter/net_http.rb:73:in `perform_request'
faraday (0.8.2) lib/faraday/adapter/net_http.rb:36:in `call'
faraday (0.8.2) lib/faraday/request/url_encoded.rb:14:in `call'
faraday (0.8.2) lib/faraday/connection.rb:226:in `run_request'
oauth2 (0.8.0) lib/oauth2/client.rb:88:in `request'
oauth2 (0.8.0) lib/oauth2/client.rb:131:in `get_token'
oauth2 (0.8.0) lib/oauth2/strategy/auth_code.rb:29:in `get_token'
omniauth-oauth2 (1.1.0) lib/omniauth/strategies/oauth2.rb:100:in `build_access_token'
omniauth-oauth2 (1.1.0) lib/omniauth/strategies/oauth2.rb:75: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'
sass (3.1.20) lib/sass/plugin/rack.rb:54:in `call'
exception_notification (2.6.1) lib/exception_notifier.rb:34:in `call'
warden (1.2.1) lib/warden/manager.rb:35:in `block in call'
warden (1.2.1) lib/warden/manager.rb:34:in `catch'
warden (1.2.1) lib/warden/manager.rb:34:in `call'
actionpack (3.0.9) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
actionpack (3.0.9) lib/action_dispatch/middleware/head.rb:14:in `call'
rack (1.2.5) lib/rack/methodoverride.rb:24:in `call'
actionpack (3.0.9) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.0.9) lib/action_dispatch/middleware/flash.rb:182:in `call'
actionpack (3.0.9) lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call'
actionpack (3.0.9) lib/action_dispatch/middleware/cookies.rb:302:in `call'
activerecord (3.0.9) lib/active_record/query_cache.rb:32:in `block in call'
activerecord (3.0.9) lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'
activerecord (3.0.9) lib/active_record/query_cache.rb:12:in `cache'
activerecord (3.0.9) lib/active_record/query_cache.rb:31:in `call'
activerecord (3.0.9) lib/active_record/connection_adapters/abstract/connection_pool.rb:354:in `call'
actionpack (3.0.9) lib/action_dispatch/middleware/callbacks.rb:46:in `block in call'
activesupport (3.0.9) lib/active_support/callbacks.rb:416:in `_run_call_callbacks'
actionpack (3.0.9) lib/action_dispatch/middleware/callbacks.rb:44:in `call'
rack (1.2.5) lib/rack/sendfile.rb:106:in `call'
actionpack (3.0.9) lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
actionpack (3.0.9) lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
railties (3.0.9) lib/rails/rack/logger.rb:13:in `call'
rack (1.2.5) lib/rack/runtime.rb:17:in `call'
activesupport (3.0.9) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.2.5) lib/rack/lock.rb:13:in `block in call'
<internal:prelude>:10:in `synchronize'
rack (1.2.5) lib/rack/lock.rb:13:in `call'
actionpack (3.0.9) lib/action_dispatch/middleware/static.rb:30:in `call'
railties (3.0.9) lib/rails/application.rb:168:in `call'
railties (3.0.9) lib/rails/application.rb:77:in `method_missing'
passenger (3.0.14) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
passenger (3.0.14) lib/phusion_passenger/abstract_request_handler.rb:516:in `accept_and_process_next_request'
passenger (3.0.14) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
passenger (3.0.14) lib/phusion_passenger/rack/application_spawner.rb:206:in `start_request_handler'
passenger (3.0.14) lib/phusion_passenger/rack/application_spawner.rb:171:in `block in handle_spawn_application'
passenger (3.0.14) lib/phusion_passenger/utils.rb:470:in `safe_fork'
passenger (3.0.14) lib/phusion_passenger/rack/application_spawner.rb:166:in `handle_spawn_application'
passenger (3.0.14) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
passenger (3.0.14) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
passenger (3.0.14) lib/phusion_passenger/abstract_server.rb:180:in `start'
passenger (3.0.14) lib/phusion_passenger/rack/application_spawner.rb:129:in `start'
passenger (3.0.14) lib/phusion_passenger/spawn_manager.rb:253:in `block (2 levels) in spawn_rack_application'
passenger (3.0.14) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
passenger (3.0.14) lib/phusion_passenger/spawn_manager.rb:246:in `block in spawn_rack_application'
passenger (3.0.14) lib/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize'
<internal:prelude>:10:in `synchronize'
passenger (3.0.14) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
passenger (3.0.14) lib/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application'
passenger (3.0.14) lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application'
passenger (3.0.14) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
passenger (3.0.14) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
passenger (3.0.14) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
passenger (3.0.14) helper-scripts/passenger-spawn-server:99:in `<main>'
As you can see faraday can't reach network connection.
How Can I setup faraday or maybe rest_client to use Proxy settings?
Thanks in advance.
I have solved problem by using monkey patching Oauth2.
require 'faraday'
module OAuth2
# The OAuth2::Client class
class Client
# The Faraday connection object
def connection
options[:connection_opts].merge!({:proxy => 'http://10.10.16.8:3128'})
#connection ||= begin
conn = Faraday.new(site, options[:connection_opts])
conn.build do |b|
options[:connection_build].call(b)
end if options[:connection_build]
conn
end
end
end
end
Here is a better solution :
Rails.application.config.middleware.use OmniAuth::Builder do
provider :google_oauth2, 'login', 'password' {
scope: ['userinfo.email'],
access_type: 'online',
client_options: {connection_opts: {proxy: 'http://myproxy:3128'}}
}
end
Put in an initializer
RestClient.proxy = "http://proxy.example.com/"
On my prod server I'm getting Missing template exceptions sometime.
The setup is VPN with CentOS5, ruby 1.9.2, Rails 3.2.1, 8 nginx instances, 6 thin instances
So, this happens with two main views, happens rarely, approx. 1 time per 1000 requests, but it is
As I understand thin recieves the request and just process with real exception, but I cannot realize why, because 999 of 1000 other request are ok and they must be ok.
Is this a filesystem issue? or smth with locale from bots?
exception example is here:
From: Exception Notifier <myhost>
Subject: [myhost Exception] controllername#actionname (ActionView::MissingTemplate) "Missing
template controllername/actionname, application/actionname with {:locale=>[...
Mime-Version: 1.0
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Gm-Message-State: ALoCoQn4St5gK1z...
A ActionView::MissingTemplate occurred in controllername#actionname:
Missing template controllername/actionname, application/actionname with {:locale=3D>[:en], :fo=
rmats=3D>[:html], :handlers=3D>[:erb, :builder, :coffee, :haml]}. Searche=
d in:
* "/..mypath../releases/20120205001108/app/views"
actionpack (3.2.1) lib/action_view/path_set.rb:58:in `find'
-------------------------------
Request:
-------------------------------
* URL : http://myhost/actionurl
* IP address: 74.208.8.48
* Parameters: {"utf8"=3D>"=E2=9C=93", "authenticity_token"=3D>"Ffkm6Bd8=
wi3+Got7uTeLhzj86hJNDpFYRjG4Yrqx4yQ=3D", "video_link"=3D>"", "controller"=
=3D>"controllername", "action"=3D>"actionname"}
* Rails root: /..mypath../releases/20120205001108
-------------------------------
Session:
-------------------------------
* session id: "0c7c55faac70eb0632139de299ccdc9a"
* data: {"session_id"=3D>"0c7c55faac70eb0632139de299ccdc9a",
"_csrf_token"=3D>"Ffkm6Bd8wi3+Got7uTeLhzj86hJNDpFYRjG4Yrqx4yQ=3D"}
-------------------------------
Environment:
-------------------------------
* CONTENT_LENGTH : 94
* CONTENT_TYPE : application/x-www-fo=
rm-urlencoded
* GATEWAY_INTERFACE : CGI/1.2
* HTTP_ACCEPT : image/gif, image/x-x=
bitmap, image/jpeg, image/pjpeg, */*
* HTTP_ACCEPT_ENCODING : gzip, deflate
* HTTP_ACCEPT_LANGUAGE : en-us
* HTTP_CONNECTION : close
* HTTP_COOKIE : _myhost_session=3DBA=
h7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTBjN2M1NWZhYWM3MGViMDYzMjEzOWRlMjk5Y2NkYzl=
hBjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMUZma202QmQ4d2kzK0dvdDd1VGVMaHpqODZoSk5E=
cEZZUmpHNFlycXg0eVE9BjsARg%3D%3D--7766b6f664ae053b5682f046ad3531e5a41bcdf=
d
* HTTP_HOST : myhost
* HTTP_MAX_FORWARDS : 10
* HTTP_PRAGMA : no-cache
* HTTP_REFERER : http://myhost/
* HTTP_USER_AGENT : Mozilla/4.0 (compati=
ble; MSIE 6.0; Windows NT 5.1)
* HTTP_VERSION : HTTP/1.0
* HTTP_X_FORWARDED_FOR : 74.208.8.48
* HTTP_X_REAL_IP : 74.208.8.48
* ORIGINAL_FULLPATH : /actionurl
* PATH_INFO : /actionurl
* QUERY_STRING : =
* REMOTE_ADDR : 127.0.0.1
* REQUEST_METHOD : POST
* REQUEST_PATH : /actionurl
* REQUEST_URI : /actionurl
* SCRIPT_NAME : =
* SERVER_NAME : myhost
* SERVER_PORT : 80
* SERVER_PROTOCOL : HTTP/1.1
* SERVER_SOFTWARE : thin 1.3.1 codename =
Triple Espresso
* action_controller.instance : controllername#actionname
* action_dispatch.backtrace_cleaner : #<Rails::BacktraceCl=
eaner:0xab76b14>
* action_dispatch.cookies : #<ActionDispatch::Co=
okies::CookieJar:0xcaedac4>
* action_dispatch.logger : #<ActiveSupport::Tag=
gedLogging:0xadb7874>
* action_dispatch.parameter_filter : [:password, /RAW_POS=
T_DATA/, /RAW_POST_DATA/, /RAW_POST_DATA/, /RAW_POST_DATA/, /RAW_POST_DAT=
A/, /RAW_POST_DATA/, /RAW_POST_DATA/, /RAW_POST_DATA/, /RAW_POST_DATA/, /=
RAW_POST_DATA/, /RAW_POST_DATA/, /RAW_POST_DATA/, /RAW_POST_DATA/, /RAW_P=
OST_DATA/, /RAW_POST_DATA/, /RAW_POST_DATA/, /RAW_POST_DATA/]
* action_dispatch.remote_ip : 74.208.8.48
* action_dispatch.request.content_type : application/x-www-fo=
rm-urlencoded
* action_dispatch.request.formats : [text/html]
* action_dispatch.request.parameters : {"utf8"=3D>"=E2=9C=93=
", "authenticity_token"=3D>"Ffkm6Bd8wi3+Got7uTeLhzj86hJNDpFYRjG4Yrqx4yQ=3D=
", "someparam"=3D>"", "controller"=3D>"controllername", "action"=3D>"actionname"}
* action_dispatch.request.path_parameters : {:controller=3D>"controllername", :action=3D>"actionname"}
* action_dispatch.request.query_parameters : {}
* action_dispatch.request.request_parameters : {"utf8"=3D>"=E2=9C=93=
", "authenticity_token"=3D>"Ffkm6Bd8wi3+Got7uTeLhzj86hJNDpFYRjG4Yrqx4yQ=3D=
", "video_link"=3D>""}
* action_dispatch.request.unsigned_session_cookie: {"session_id"=3D>"0c=
7c55faac70eb0632139de299ccdc9a", "_csrf_token"=3D>"Ffkm6Bd8wi3+Got7uTeLhz=
j86hJNDpFYRjG4Yrqx4yQ=3D"}
* action_dispatch.request_id : 3e96f7bca9fc30f3e4eb=
1d91e61a63c0
* action_dispatch.routes : #<ActionDispatch::Ro=
uting::RouteSet:0xb0b029c>
* action_dispatch.secret_token : 20b9fbcf1214f8f88d5e=
549c61892c2558dffbe59db6c9dda63c84554af6d628248f3fd5217eb12e47df41260789a=
e59ad359b67e2309e5832390244777d56a7
* action_dispatch.show_detailed_exceptions : false
* action_dispatch.show_exceptions : true
* async.callback : #<Method: Thin::Unix=
Connection(Thin::Connection)#post_process>
* async.close : #<EventMachine::Defa=
ultDeferrable:0xcacf7a4>
* exception_notifier.options : {:sender_address=3D>=
"\"myhost Exception Notifier\" <exception#email>", :exception_recipients=3D>=
["exception#email"], :email_prefix=3D>"[myhost Exception] ", :sections=3D>["=
request", "session", "environment", "backtrace"], :ignore_exceptions=3D>[=
ActiveRecord::RecordNotFound, AbstractController::ActionNotFound, ActionC=
ontroller::RoutingError]}
* rack-cache.allow_reload : false
* rack-cache.allow_revalidate : false
* rack-cache.cache_key : Rack::Cache::Key
* rack-cache.default_ttl : 0
* rack-cache.entitystore : rails:/
* rack-cache.metastore : rails:/
* rack-cache.private_headers : ["Authorization", "C=
ookie"]
* rack-cache.storage : #<Rack::Cache::Stora=
ge:0xc2b79b8>
* rack-cache.use_native_ttl : false
* rack-cache.verbose : true
* rack.errors : #<IO:0x99b5b50>
* rack.input : #<StringIO:0xcaa0bac=
>
* rack.multiprocess : false
* rack.multithread : false
* rack.request.cookie_hash : {"_myhost_session"=3D=
>"BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTBjN2M1NWZhYWM3MGViMDYzMjEzOWRlMjk5Y2N=
kYzlhBjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMUZma202QmQ4d2kzK0dvdDd1VGVMaHpqODZo=
Sk5EcEZZUmpHNFlycXg0eVE9BjsARg=3D=3D--7766b6f664ae053b5682f046ad3531e5a41=
bcdfd"}
* rack.request.cookie_string : _myhost_session=3DBA=
h7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTBjN2M1NWZhYWM3MGViMDYzMjEzOWRlMjk5Y2NkYzl=
hBjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMUZma202QmQ4d2kzK0dvdDd1VGVMaHpqODZoSk5E=
cEZZUmpHNFlycXg0eVE9BjsARg%3D%3D--7766b6f664ae053b5682f046ad3531e5a41bcdf=
d
* rack.request.form_hash : {"utf8"=3D>"=E2=9C=93=
", "authenticity_token"=3D>"Ffkm6Bd8wi3+Got7uTeLhzj86hJNDpFYRjG4Yrqx4yQ=3D=
", "someparam"=3D>""}
* rack.request.form_input : #<StringIO:0xcaa0bac=
>
* rack.request.form_vars : utf8=3D%E2%9C%93&aut=
henticity_token=3DFfkm6Bd8wi3%2BGot7uTeLhzj86hJNDpFYRjG4Yrqx4yQ%3D&video_=
link=3D
* rack.request.query_hash : {}
* rack.request.query_string : =
* rack.run_once : false
* rack.session : {"session_id"=3D>"0c=
7c55faac70eb0632139de299ccdc9a", "_csrf_token"=3D>"Ffkm6Bd8wi3+Got7uTeLhz=
j86hJNDpFYRjG4Yrqx4yQ=3D"}
* rack.session.options : {:path=3D>"/", :doma=
in=3D>nil, :expire_after=3D>nil, :secure=3D>false, :httponly=3D>true, :de=
fer=3D>false, :renew=3D>false, :coder=3D>#<Rack::Session::Cookie::Base64:=
:Marshal:0xc26f410>, :id=3D>"0c7c55faac70eb0632139de299ccdc9a"}
* rack.url_scheme : http
* rack.version : [1, 0]
=
* Process: 13504
* Server : myserver
-------------------------------
Backtrace:
-------------------------------
actionpack (3.2.1) lib/action_view/path_set.rb:58:in `find'
actionpack (3.2.1) lib/action_view/lookup_context.rb:109:in `find'
actionpack (3.2.1) lib/action_view/renderer/abstract_renderer.rb:3:in `=
find_template'
actionpack (3.2.1) lib/action_view/renderer/template_renderer.rb:28:in =
`determine_template'
actionpack (3.2.1) lib/action_view/renderer/template_renderer.rb:10:in =
`render'
actionpack (3.2.1) lib/action_view/renderer/renderer.rb:36:in `render_t=
emplate'
actionpack (3.2.1) lib/action_view/renderer/renderer.rb:17:in `render'
actionpack (3.2.1) lib/abstract_controller/rendering.rb:109:in `_render=
_template'
actionpack (3.2.1) lib/action_controller/metal/streaming.rb:225:in `_re=
nder_template'
actionpack (3.2.1) lib/abstract_controller/rendering.rb:103:in `render_=
to_body'
actionpack (3.2.1) lib/action_controller/metal/renderers.rb:28:in `rend=
er_to_body'
actionpack (3.2.1) lib/action_controller/metal/compatibility.rb:50:in `=
render_to_body'
actionpack (3.2.1) lib/abstract_controller/rendering.rb:88:in `render'
actionpack (3.2.1) lib/action_controller/metal/rendering.rb:16:in `rend=
er'
actionpack (3.2.1) lib/action_controller/metal/instrumentation.rb:40:in=
`block (2 levels) in render'
activesupport (3.2.1) lib/active_support/core_ext/benchmark.rb:5:in `bl=
ock in ms'
/usr/lib/ruby/1.9.1/benchmark.rb:309:in `realtime'
activesupport (3.2.1) lib/active_support/core_ext/benchmark.rb:5:in `ms=
'
actionpack (3.2.1) lib/action_controller/metal/instrumentation.rb:40:in=
`block in render'
actionpack (3.2.1) lib/action_controller/metal/instrumentation.rb:83:in=
`cleanup_view_runtime'
activerecord (3.2.1) lib/active_record/railties/controller_runtime.rb:2=
4:in `cleanup_view_runtime'
actionpack (3.2.1) lib/action_controller/metal/instrumentation.rb:39:in=
`render'
actionpack (3.2.1) lib/action_controller/metal/implicit_render.rb:10:in=
`default_render'
actionpack (3.2.1) lib/action_controller/metal/implicit_render.rb:5:in =
`send_action'
actionpack (3.2.1) lib/abstract_controller/base.rb:167:in `process_acti=
on'
actionpack (3.2.1) lib/action_controller/metal/rendering.rb:10:in `proc=
ess_action'
actionpack (3.2.1) lib/abstract_controller/callbacks.rb:18:in `block in=
process_action'
activesupport (3.2.1) lib/active_support/callbacks.rb:414:in `_run__858=
933213__process_action__417312363__callbacks'
activesupport (3.2.1) lib/active_support/callbacks.rb:405:in `__run_cal=
lback'
activesupport (3.2.1) lib/active_support/callbacks.rb:385:in `_run_proc=
ess_action_callbacks'
activesupport (3.2.1) lib/active_support/callbacks.rb:81:in `run_callba=
cks'
actionpack (3.2.1) lib/abstract_controller/callbacks.rb:17:in `process_=
action'
actionpack (3.2.1) lib/action_controller/metal/rescue.rb:29:in `process=
_action'
actionpack (3.2.1) lib/action_controller/metal/instrumentation.rb:30:in=
`block in process_action'
activesupport (3.2.1) lib/active_support/notifications.rb:123:in `block=
in instrument'
activesupport (3.2.1) lib/active_support/notifications/instrumenter.rb:=
20:in `instrument'
activesupport (3.2.1) lib/active_support/notifications.rb:123:in `instr=
ument'
actionpack (3.2.1) lib/action_controller/metal/instrumentation.rb:29:in=
`process_action'
actionpack (3.2.1) lib/action_controller/metal/params_wrapper.rb:205:in=
`process_action'
activerecord (3.2.1) lib/active_record/railties/controller_runtime.rb:1=
8:in `process_action'
newrelic_rpm (3.3.1) lib/new_relic/agent/instrumentation/rails3/action_=
controller.rb:34:in `block in process_action'
newrelic_rpm (3.3.1) lib/new_relic/agent/instrumentation/controller_ins=
trumentation.rb:255:in `block in perform_action_with_newrelic_trace'
newrelic_rpm (3.3.1) lib/new_relic/agent/method_tracer.rb:242:in `trace=
_execution_scoped'
newrelic_rpm (3.3.1) lib/new_relic/agent/instrumentation/controller_ins=
trumentation.rb:250:in `perform_action_with_newrelic_trace'
newrelic_rpm (3.3.1) lib/new_relic/agent/instrumentation/rails3/action_=
controller.rb:33:in `process_action'
actionpack (3.2.1) lib/abstract_controller/base.rb:121:in `process'
actionpack (3.2.1) lib/abstract_controller/rendering.rb:45:in `process'=
actionpack (3.2.1) lib/action_controller/metal.rb:203:in `dispatch'
actionpack (3.2.1) lib/action_controller/metal/rack_delegation.rb:14:in=
`dispatch'
actionpack (3.2.1) lib/action_controller/metal.rb:246:in `block in acti=
on'
actionpack (3.2.1) lib/action_dispatch/routing/route_set.rb:66:in `call=
'
actionpack (3.2.1) lib/action_dispatch/routing/route_set.rb:66:in `disp=
atch'
actionpack (3.2.1) lib/action_dispatch/routing/route_set.rb:30:in `call=
'
journey (1.0.1) lib/journey/router.rb:68:in `block in call'
journey (1.0.1) lib/journey/router.rb:56:in `each'
journey (1.0.1) lib/journey/router.rb:56:in `call'
actionpack (3.2.1) lib/action_dispatch/routing/route_set.rb:589:in `cal=
l'
newrelic_rpm (3.3.1) lib/new_relic/rack/browser_monitoring.rb:23:in `ca=
ll'
exception_notification (2.5.2) lib/exception_notifier.rb:25:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/best_standards_suppor=
t.rb:17:in `call'
rack (1.4.1) lib/rack/etag.rb:23:in `call'
rack (1.4.1) lib/rack/conditionalget.rb:35:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/head.rb:14:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/params_parser.rb:21:i=
n `call'
actionpack (3.2.1) lib/action_dispatch/middleware/flash.rb:242:in `call=
'
rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context'
rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/cookies.rb:338:in `ca=
ll'
activerecord (3.2.1) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.1) lib/active_record/connection_adapters/abstract/con=
nection_pool.rb:443:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/callbacks.rb:28:in `b=
lock in call'
activesupport (3.2.1) lib/active_support/callbacks.rb:405:in `_run__332=
759817__call__1023748432__callbacks'
activesupport (3.2.1) lib/active_support/callbacks.rb:405:in `__run_cal=
lback'
activesupport (3.2.1) lib/active_support/callbacks.rb:385:in `_run_call=
_callbacks'
activesupport (3.2.1) lib/active_support/callbacks.rb:81:in `run_callba=
cks'
actionpack (3.2.1) lib/action_dispatch/middleware/callbacks.rb:27:in `c=
all'
rack (1.4.1) lib/rack/sendfile.rb:102:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/remote_ip.rb:31:in `c=
all'
actionpack (3.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:1=
6:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/show_exceptions.rb:56=
:in `call'
railties (3.2.1) lib/rails/rack/logger.rb:26:in `call_app'
railties (3.2.1) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/request_id.rb:22:in `=
call'
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.1) lib/active_support/cache/strategy/local_cache.rb:=
72:in `call'
rack (1.4.1) lib/rack/lock.rb:15:in `call'
rack-cache (1.1) lib/rack/cache/context.rb:132:in `forward'
rack-cache (1.1) lib/rack/cache/context.rb:139:in `pass'
rack-cache (1.1) lib/rack/cache/context.rb:151:in `invalidate'
rack-cache (1.1) lib/rack/cache/context.rb:70:in `call!'
rack-cache (1.1) lib/rack/cache/context.rb:50:in `call'
railties (3.2.1) lib/rails/engine.rb:479:in `call'
railties (3.2.1) lib/rails/application.rb:220:in `call'
railties (3.2.1) lib/rails/railtie/configurable.rb:30:in `method_missin=
g'
thin (1.3.1) lib/thin/connection.rb:80:in `block in pre_process'
thin (1.3.1) lib/thin/connection.rb:78:in `catch'
thin (1.3.1) lib/thin/connection.rb:78:in `pre_process'
thin (1.3.1) lib/thin/connection.rb:53:in `process'
thin (1.3.1) lib/thin/connection.rb:38:in `receive_data'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
thin (1.3.1) lib/thin/backends/base.rb:61:in `start'
thin (1.3.1) lib/thin/server.rb:159:in `start'
thin (1.3.1) lib/thin/controllers/controller.rb:86:in `start'
thin (1.3.1) lib/thin/runner.rb:185:in `run_command'
thin (1.3.1) lib/thin/runner.rb:151:in `run!'
thin (1.3.1) bin/thin:6:in `<top (required)>'
/..mypath../shared/bundle/ruby/1.9.1/bin/thin:19:in `load'
/..mypath../shared/bundle/ruby/1.9.1/bin/thin:19:in `<main>'
Is this supposed to be a POST request? That's what's showing up in the stacktrace:
REQUEST_METHOD : POST