Dynamoid / dynamoid

Ruby ORM for Amazon's DynamoDB.
MIT License
580 stars 194 forks source link

Migration from Dynamoid 0.7 to 1.1.0 #90

Closed raunaklakhwani closed 8 years ago

raunaklakhwani commented 8 years ago

Hi,

I am using Dynamoid 1.1.0 and I am getting the following error on line: require 'dynamoid/adapter/aws_sdk'

Error : cannot load such file -- dynamoid/adapter/aws_sdk

cignoir commented 8 years ago

Hi @raunaklakhwani,

Is this what you are looking for? dynamoid/adapter_plugin/aws_sdk_v2

raunaklakhwani commented 8 years ago

Hi,

I have a web application in ruby on rails. I have migrated from rails 3.2 to 4.0.

I am using dynamoid 0.6 gem version.

After the migration, I am getting this error :

/home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/dynamoid-0.6.1.1/lib/dynamoid/config.rb:11:in <module:Config>': uninitialized constant ActiveModel::Observing (NameError) from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/dynamoid-0.6.1.1/lib/dynamoid/config.rb:8:in module:Dynamoid' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/dynamoid-0.6.1.1/lib/dynamoid/config.rb:5:in <top (required)>' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/rubygems/custom_require.rb:36:in require' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/rubygems/custom_require.rb:36:in require' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/dynamoid-0.6.1.1/lib/dynamoid.rb:21:in <top (required)>' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:76:in require' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:76:in block (2 levels) in require' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:74:in each' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:74:in block in require' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:63:in each' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:63:in require' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:132:in require' from /home/lakhwani/FCLaunchRequirement/src/FCLaunchRequirementWebsite/rails-root/config/application.rb:88:in <top (required)>' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/rubygems/custom_require.rb:36:in require' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/rubygems/custom_require.rb:36:in require' from /home/lakhwani/FCLaunchRequirement/src/FCLaunchRequirementWebsite/rails-root/config/environment.rb:6:in <top (required)>' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/rubygems/custom_require.rb:36:in require' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/rubygems/custom_require.rb:36:in require' from /home/lakhwani/FCLaunchRequirement/src/FCLaunchRequirementWebsite/rails-root/config.ru:3:in block in

' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:55:in instance_eval' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:55:in initialize' from /home/lakhwani/FCLaunchRequirement/src/FCLaunchRequirementWebsite/rails-root/config.ru:in new' from /home/lakhwani/FCLaunchRequirement/src/FCLaunchRequirementWebsite/rails-root/config.ru:in
' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:49:in eval' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:49:in new_from_string' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:40:in parse_file' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:277:in build_app_and_options_from_config' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:199:in app' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:314:in wrapped_app' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:250:in start' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:141:in start' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/gems/1.9.1/gems/rack-1.5.2/bin/rackup:4:in <top (required)>' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/bin/rackup:23:in load' from /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/bin/rackup:23:in <main>' /home/lakhwani/FCLaunchRequirement/env/BrazilRake-1.1/runtime/ruby2.1.x/lib/ruby/site_ruby/2.1.0/amazon/brazil/ruby.rb:98:in exec_build_script': Command exited with status 1!! (RuntimeError) from /home/lakhwani/FCLaunchRequirement/env/BrazilRake-1.1/runtime/bin/brazilrake:61:in block in <main>' from /home/lakhwani/FCLaunchRequirement/env/BrazilRake-1.1/runtime/bin/brazilrake:48:in each' from /home/lakhwani/FCLaunchRequirement/env/BrazilRake-1.1/runtime/bin/brazilrake:48:in `
'

Can you please help me in this?

Regards, Ronak Lakhwani

On Fri, Jul 29, 2016 at 9:54 AM, cignoir notifications@github.com wrote:

Hi @raunaklakhwani https://github.com/raunaklakhwani,

Is this what you are looking for? dynamoid/adapter_plugin/aws_sdk_v2 https://github.com/Dynamoid/Dynamoid/blob/master/lib/dynamoid/adapter_plugin/aws_sdk_v2.rb

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Dynamoid/Dynamoid/issues/90#issuecomment-236091532, or mute the thread https://github.com/notifications/unsubscribe-auth/AIP0Ydm6OAWLO0yZR5IKzUK1LBFGiTEEks5qaYB2gaJpZM4JXR0r .

Thanks and Regards, Ronak Lakhwani Computer Science and Engineering, IIT Roorkee Contact : 8477935097

cavi21 commented 8 years ago

Hi! Looking into the backtrace looks like you are still running dynamoid-0.6.1.1. If you properly upgrade to dynamoid-1.1.0 you also would need to upgrade the aws-sdk as seen in the prerequisities.

raunaklakhwani commented 8 years ago

Thanks for your quick response.

I did put wrong logs earlier.

I am getting the following error :

expected hash value for member 1 of key attribute_value_list of value at key is_submitted of option scan_filter

on the line :

@unsingedoff_nodes_count = Node.where(:is_submitted => 't').where(:is_signed_off => 'f').count

Logs :

aws-sdk (1.20.0) lib/aws/core/option_grammar.rb:337:in validate' aws-sdk (1.20.0) lib/aws/core/option_grammar.rb:245:inblock in validate' aws-sdk (1.20.0) lib/aws/core/option_grammar.rb:243:in each' aws-sdk (1.20.0) lib/aws/core/option_grammar.rb:243:invalidate' aws-sdk (1.20.0) lib/aws/core/option_grammar.rb:346:in block in validate' aws-sdk (1.20.0) lib/aws/core/option_grammar.rb:342:ineach' aws-sdk (1.20.0) lib/aws/core/option_grammar.rb:342:in validate' aws-sdk (1.20.0) lib/aws/core/option_grammar.rb:410:inblock in validate' aws-sdk (1.20.0) lib/aws/core/option_grammar.rb:408:in each' aws-sdk (1.20.0) lib/aws/core/option_grammar.rb:408:invalidate' aws-sdk (1.20.0) lib/aws/core/option_grammar.rb:590:in block in validate' aws-sdk (1.20.0) lib/aws/core/option_grammar.rb:586:ineach' aws-sdk (1.20.0) lib/aws/core/option_grammar.rb:586:in validate' aws-sdk (1.20.0) lib/aws/core/option_grammar.rb:611:into_h' aws-sdk (1.20.0) lib/aws/core/option_grammar.rb:621:in to_json' aws-sdk (1.20.0) lib/aws/core/json_request_builder.rb:29:inpopulate_request' aws-sdk (1.20.0) lib/aws/core/client.rb:704:in block (2 levels) in define_client_method' aws-sdk (1.20.0) lib/aws/core/client.rb:549:inbuild_request' aws-sdk (1.20.0) lib/aws/core/client.rb:482:in block (3 levels) in client_request' aws-sdk (1.20.0) lib/aws/core/response.rb:171:incall' aws-sdk (1.20.0) lib/aws/core/response.rb:171:in build_request' aws-sdk (1.20.0) lib/aws/core/response.rb:111:ininitialize' aws-sdk (1.20.0) lib/aws/core/client.rb:195:in new' aws-sdk (1.20.0) lib/aws/core/client.rb:195:innew_response' aws-sdk (1.20.0) lib/aws/core/client.rb:481:in block (2 levels) in client_request' aws-sdk (1.20.0) lib/aws/core/client.rb:382:inlog_client_request' aws-sdk (1.20.0) lib/aws/core/client.rb:468:in block in client_request' aws-sdk (1.20.0) lib/aws/core/client.rb:364:inreturn_or_raise' aws-sdk (1.20.0) lib/aws/core/client.rb:467:in client_request' (eval):3:inscan' dynamoid (1.0.0) lib/dynamoid/adapter_plugin/aws_sdk_v2.rb:360:in block (2 levels) in scan' dynamoid (1.0.0) lib/dynamoid/adapter_plugin/aws_sdk_v2.rb:359:inloop' dynamoid (1.0.0) lib/dynamoid/adapter_plugin/aws_sdk_v2.rb:359:in block in scan' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:142:ineach' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:142:in each' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:142:inblock in records_via_scan' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:115:in each' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:115:ineach' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:115:in to_a' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:115:inArray' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:115:in records' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:95:ineach' app/controllers/application_controller.rb:107:in count' app/controllers/application_controller.rb:107:inset_global_counts' activesupport (4.1.14.2) lib/active_support/callbacks.rb:429:in block in make_lambda' activesupport (4.1.14.2) lib/active_support/callbacks.rb:143:incall' activesupport (4.1.14.2) lib/active_support/callbacks.rb:143:in block in halting_and_conditional' activesupport (4.1.14.2) lib/active_support/callbacks.rb:501:incall' activesupport (4.1.14.2) lib/active_support/callbacks.rb:501:in block in call' activesupport (4.1.14.2) lib/active_support/callbacks.rb:501:ineach' activesupport (4.1.14.2) lib/active_support/callbacks.rb:501:in call' activesupport (4.1.14.2) lib/active_support/callbacks.rb:86:inrun_callbacks' actionpack (4.1.14.2) lib/abstract_controller/callbacks.rb:19:in process_action' actionpack (4.1.14.2) lib/action_controller/metal/rescue.rb:29:inprocess_action' actionpack (4.1.14.2) lib/action_controller/metal/instrumentation.rb:32:in block in process_action' activesupport (4.1.14.2) lib/active_support/notifications.rb:159:inblock in instrument' activesupport (4.1.14.2) lib/active_support/notifications/instrumenter.rb:20:in instrument' activesupport (4.1.14.2) lib/active_support/notifications.rb:159:ininstrument' actionpack (4.1.14.2) lib/action_controller/metal/instrumentation.rb:30:in process_action' actionpack (4.1.14.2) lib/action_controller/metal/params_wrapper.rb:250:inprocess_action' actionpack (4.1.14.2) lib/abstract_controller/base.rb:136:in process' actionview (4.1.14.2) lib/action_view/rendering.rb:30:inprocess' actionpack (4.1.14.2) lib/action_controller/metal.rb:196:in dispatch' actionpack (4.1.14.2) lib/action_controller/metal/rack_delegation.rb:13:indispatch' actionpack (4.1.14.2) lib/action_controller/metal.rb:232:in block in action' actionpack (4.1.14.2) lib/action_dispatch/routing/route_set.rb:80:incall' actionpack (4.1.14.2) lib/action_dispatch/routing/route_set.rb:80:in dispatch' actionpack (4.1.14.2) lib/action_dispatch/routing/route_set.rb:48:incall' actionpack (4.1.14.2) lib/action_dispatch/journey/router.rb:73:in block in call' actionpack (4.1.14.2) lib/action_dispatch/journey/router.rb:59:ineach' actionpack (4.1.14.2) lib/action_dispatch/journey/router.rb:59:in call' actionpack (4.1.14.2) lib/action_dispatch/routing/route_set.rb:690:incall' rack (1.5.2) lib/rack/etag.rb:23:in call' rack (1.5.2) lib/rack/conditionalget.rb:25:incall' rack (1.5.2) lib/rack/head.rb:11:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/params_parser.rb:27:incall' actionpack (4.1.14.2) lib/action_dispatch/middleware/flash.rb:254:in call' rack (1.5.2) lib/rack/session/abstract/id.rb:225:incontext' rack (1.5.2) lib/rack/session/abstract/id.rb:220:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/cookies.rb:562:incall' actionpack (4.1.14.2) lib/action_dispatch/middleware/callbacks.rb:29:in block in call' activesupport (4.1.14.2) lib/active_support/callbacks.rb:82:inrun_callbacks' actionpack (4.1.14.2) lib/action_dispatch/middleware/callbacks.rb:27:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/reloader.rb:73:incall' actionpack (4.1.14.2) lib/action_dispatch/middleware/remote_ip.rb:76:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/debug_exceptions.rb:17:incall' actionpack (4.1.14.2) lib/action_dispatch/middleware/show_exceptions.rb:30:in call' railties (4.1.14.2) lib/rails/rack/logger.rb:38:incall_app' railties (4.1.14.2) lib/rails/rack/logger.rb:20:in block in call' activesupport (4.1.14.2) lib/active_support/tagged_logging.rb:68:inblock in tagged' activesupport (4.1.14.2) lib/active_support/tagged_logging.rb:26:in tagged' activesupport (4.1.14.2) lib/active_support/tagged_logging.rb:68:intagged' railties (4.1.14.2) lib/rails/rack/logger.rb:20:in call' /opt/brazil-pkg-cache/packages/AmazonRailsLogger/AmazonRailsLogger-4.0.80.53/RHEL5_64/DEV.STD.PTHREAD/build/ruby1.9/site_ruby/1.9.1/amazon/set_request_id.rb:9:incall' /opt/brazil-pkg-cache/packages/AmazonRailsLogger/AmazonRailsLogger-4.0.80.53/RHEL5_64/DEV.STD.PTHREAD/build/ruby1.9/site_ruby/1.9.1/amazon/set_request_id.rb:9:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/request_id.rb:21:incall' rack (1.5.2) lib/rack/methodoverride.rb:21:in call' rack (1.5.2) lib/rack/runtime.rb:17:incall' activesupport (4.1.14.2) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in call' rack (1.5.2) lib/rack/lock.rb:17:incall' actionpack (4.1.14.2) lib/action_dispatch/middleware/static.rb:84:in call' rack (1.5.2) lib/rack/sendfile.rb:112:incall' railties (4.1.14.2) lib/rails/engine.rb:514:in call' railties (4.1.14.2) lib/rails/application.rb:144:incall' railties (4.1.14.2) lib/rails/railtie.rb:194:in public_send' railties (4.1.14.2) lib/rails/railtie.rb:194:inmethod_missing' rack (1.5.2) lib/rack/lint.rb:49:in _call' rack (1.5.2) lib/rack/lint.rb:37:incall' rack (1.5.2) lib/rack/showexceptions.rb:24:in call' rack (1.5.2) lib/rack/commonlogger.rb:33:incall' rack (1.5.2) lib/rack/chunked.rb:43:in call' rack (1.5.2) lib/rack/content_length.rb:14:incall' rack (1.5.2) lib/rack/handler/webrick.rb:60:in service' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/webrick/httpserver.rb:138:inservice' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/webrick/httpserver.rb:94:in run' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/webrick/server.rb:191:inblock in start_thread'

Can you help me in this?

cavi21 commented 8 years ago

Look into your stack trace:

#[...]
aws-sdk (1.20.0) lib/aws/core/client.rb:467:in client_request' (eval):3:inscan'
dynamoid (1.0.0) lib/dynamoid/adapter_plugin/aws_sdk_v2.rb:360:in block (2 levels) in 
#[...]

You are using aws-sdk 1.x that's not supported by dynamoid 1.x

raunaklakhwani commented 8 years ago

Cavilliotti,

Thanks a lot for your quick response.

I did see that and updated the aws-sdk to use 2.0 version.

Now I wonder when I pass config.endpoint = 'http://dynamodb.us-west-2.amazonaws.com' then I am able to connect to dynamo db but if I do not pass, then I get following error :

Error:

SSL_connect returned=1 errno=0 state=error: certificate verify failed

Logs

/home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/net/http.rb:800:in connect' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/net/http.rb:800:inblock in connect' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/timeout.rb:69:in timeout' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/timeout.rb:100:intimeout' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/net/http.rb:800:in connect' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/net/http.rb:756:indo_start' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/net/http.rb:751:in start' aws-sdk-core (2.3.19) lib/seahorse/client/net_http/connection_pool.rb:281:instart_session' aws-sdk-core (2.3.19) lib/seahorse/client/net_http/connection_pool.rb:93:in session_for' aws-sdk-core (2.3.19) lib/seahorse/client/net_http/handler.rb:116:insession' aws-sdk-core (2.3.19) lib/seahorse/client/net_http/handler.rb:68:in transmit' aws-sdk-core (2.3.19) lib/seahorse/client/net_http/handler.rb:42:incall' aws-sdk-core (2.3.19) lib/seahorse/client/plugins/content_length.rb:12:in call' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/dynamodb_crc32_validation.rb:27:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/json/error_handler.rb:8:in call' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/request_signer.rb:84:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:87:in call' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:118:inretry_request' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:101:in retry_if_possible' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:89:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:118:in retry_request' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:101:inretry_if_possible' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:89:in call' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:118:inretry_request' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:101:in retry_if_possible' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:89:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:118:in retry_request' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:101:inretry_if_possible' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:89:in call' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:118:inretry_request' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:101:in retry_if_possible' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:89:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:118:in retry_request' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:101:inretry_if_possible' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:89:in call' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:118:inretry_request' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:101:in retry_if_possible' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:89:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:118:in retry_request' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:101:inretry_if_possible' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:89:in call' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:118:inretry_request' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:101:in retry_if_possible' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:89:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:118:in retry_request' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:101:inretry_if_possible' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:89:in call' aws-sdk-core (2.3.19) lib/aws-sdk-core/json/handler.rb:11:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/user_agent.rb:12:in call' aws-sdk-core (2.3.19) lib/seahorse/client/plugins/endpoint.rb:41:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/param_validator.rb:21:in call' aws-sdk-core (2.3.19) lib/seahorse/client/plugins/raise_response_errors.rb:14:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/dynamodb_simple_attributes.rb:112:in call' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/param_converter.rb:20:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/response_paging.rb:26:in call' aws-sdk-core (2.3.19) lib/seahorse/client/plugins/response_target.rb:21:incall' aws-sdk-core (2.3.19) lib/seahorse/client/request.rb:70:in send_request' aws-sdk-core (2.3.19) lib/seahorse/client/base.rb:207:inblock (2 levels) in define_operation_methods' dynamoid (1.0.0) lib/dynamoid/adapter_plugin/aws_sdk_v2.rb:360:in block (2 levels) in scan' dynamoid (1.0.0) lib/dynamoid/adapter_plugin/aws_sdk_v2.rb:359:inloop' dynamoid (1.0.0) lib/dynamoid/adapter_plugin/aws_sdk_v2.rb:359:in block in scan' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:142:ineach' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:142:in each' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:142:inblock in records_via_scan' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:115:in each' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:115:ineach' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:115:in to_a' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:115:inArray' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:115:in records' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:95:ineach' app/controllers/application_controller.rb:106:in count' app/controllers/application_controller.rb:106:inset_global_counts' activesupport (4.1.14.2) lib/active_support/callbacks.rb:429:in block in make_lambda' activesupport (4.1.14.2) lib/active_support/callbacks.rb:143:incall' activesupport (4.1.14.2) lib/active_support/callbacks.rb:143:in block in halting_and_conditional' activesupport (4.1.14.2) lib/active_support/callbacks.rb:501:incall' activesupport (4.1.14.2) lib/active_support/callbacks.rb:501:in block in call' activesupport (4.1.14.2) lib/active_support/callbacks.rb:501:ineach' activesupport (4.1.14.2) lib/active_support/callbacks.rb:501:in call' activesupport (4.1.14.2) lib/active_support/callbacks.rb:86:inrun_callbacks' actionpack (4.1.14.2) lib/abstract_controller/callbacks.rb:19:in process_action' actionpack (4.1.14.2) lib/action_controller/metal/rescue.rb:29:inprocess_action' actionpack (4.1.14.2) lib/action_controller/metal/instrumentation.rb:32:in block in process_action' activesupport (4.1.14.2) lib/active_support/notifications.rb:159:inblock in instrument' activesupport (4.1.14.2) lib/active_support/notifications/instrumenter.rb:20:in instrument' activesupport (4.1.14.2) lib/active_support/notifications.rb:159:ininstrument' actionpack (4.1.14.2) lib/action_controller/metal/instrumentation.rb:30:in process_action' actionpack (4.1.14.2) lib/action_controller/metal/params_wrapper.rb:250:inprocess_action' actionpack (4.1.14.2) lib/abstract_controller/base.rb:136:in process' actionview (4.1.14.2) lib/action_view/rendering.rb:30:inprocess' actionpack (4.1.14.2) lib/action_controller/metal.rb:196:in dispatch' actionpack (4.1.14.2) lib/action_controller/metal/rack_delegation.rb:13:indispatch' actionpack (4.1.14.2) lib/action_controller/metal.rb:232:in block in action' actionpack (4.1.14.2) lib/action_dispatch/routing/route_set.rb:80:incall' actionpack (4.1.14.2) lib/action_dispatch/routing/route_set.rb:80:in dispatch' actionpack (4.1.14.2) lib/action_dispatch/routing/route_set.rb:48:incall' actionpack (4.1.14.2) lib/action_dispatch/journey/router.rb:73:in block in call' actionpack (4.1.14.2) lib/action_dispatch/journey/router.rb:59:ineach' actionpack (4.1.14.2) lib/action_dispatch/journey/router.rb:59:in call' actionpack (4.1.14.2) lib/action_dispatch/routing/route_set.rb:690:incall' rack (1.5.2) lib/rack/etag.rb:23:in call' rack (1.5.2) lib/rack/conditionalget.rb:25:incall' rack (1.5.2) lib/rack/head.rb:11:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/params_parser.rb:27:incall' actionpack (4.1.14.2) lib/action_dispatch/middleware/flash.rb:254:in call' rack (1.5.2) lib/rack/session/abstract/id.rb:225:incontext' rack (1.5.2) lib/rack/session/abstract/id.rb:220:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/cookies.rb:562:incall' actionpack (4.1.14.2) lib/action_dispatch/middleware/callbacks.rb:29:in block in call' activesupport (4.1.14.2) lib/active_support/callbacks.rb:82:inrun_callbacks' actionpack (4.1.14.2) lib/action_dispatch/middleware/callbacks.rb:27:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/reloader.rb:73:incall' actionpack (4.1.14.2) lib/action_dispatch/middleware/remote_ip.rb:76:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/debug_exceptions.rb:17:incall' actionpack (4.1.14.2) lib/action_dispatch/middleware/show_exceptions.rb:30:in call' railties (4.1.14.2) lib/rails/rack/logger.rb:38:incall_app' railties (4.1.14.2) lib/rails/rack/logger.rb:20:in block in call' activesupport (4.1.14.2) lib/active_support/tagged_logging.rb:68:inblock in tagged' activesupport (4.1.14.2) lib/active_support/tagged_logging.rb:26:in tagged' activesupport (4.1.14.2) lib/active_support/tagged_logging.rb:68:intagged' railties (4.1.14.2) lib/rails/rack/logger.rb:20:in call' /opt/brazil-pkg-cache/packages/AmazonRailsLogger/AmazonRailsLogger-4.0.80.55/RHEL5_64/DEV.STD.PTHREAD/build/ruby1.9/site_ruby/1.9.1/amazon/set_request_id.rb:9:incall' /opt/brazil-pkg-cache/packages/AmazonRailsLogger/AmazonRailsLogger-4.0.80.55/RHEL5_64/DEV.STD.PTHREAD/build/ruby1.9/site_ruby/1.9.1/amazon/set_request_id.rb:9:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/request_id.rb:21:incall' rack (1.5.2) lib/rack/methodoverride.rb:21:in call' rack (1.5.2) lib/rack/runtime.rb:17:incall' activesupport (4.1.14.2) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in call' rack (1.5.2) lib/rack/lock.rb:17:incall' actionpack (4.1.14.2) lib/action_dispatch/middleware/static.rb:84:in call' rack (1.5.2) lib/rack/sendfile.rb:112:incall' railties (4.1.14.2) lib/rails/engine.rb:514:in call' railties (4.1.14.2) lib/rails/application.rb:144:incall' railties (4.1.14.2) lib/rails/railtie.rb:194:in public_send' railties (4.1.14.2) lib/rails/railtie.rb:194:inmethod_missing' rack (1.5.2) lib/rack/lint.rb:49:in _call' rack (1.5.2) lib/rack/lint.rb:37:incall' rack (1.5.2) lib/rack/showexceptions.rb:24:in call' rack (1.5.2) lib/rack/commonlogger.rb:33:incall' rack (1.5.2) lib/rack/chunked.rb:43:in call' rack (1.5.2) lib/rack/content_length.rb:14:incall' rack (1.5.2) lib/rack/handler/webrick.rb:60:in service' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/webrick/httpserver.rb:138:inservice' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/webrick/httpserver.rb:94:in run' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/webrick/server.rb:191:inblock in start_thread'

Can you help me in this?

raunaklakhwani commented 8 years ago

Agustin Cavilliotti,

Thanks a lot. I got the issue that why I was not able to get aws-sdk updated to 2. But Now everything is fine.

When I am trying to execute,

Node.where(:region => region).where(:is_completed => 'f').count

It gives me error:

value must be enumerable

Logs:

/home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/set.rb:85:in do_with_enum' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/set.rb:310:in merge' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/set.rb:75:in initialize' dynamoid (1.0.0) lib/dynamoid/persistence.rb:99:innew' dynamoid (1.0.0) lib/dynamoid/persistence.rb:99:in undump_field' dynamoid (1.0.0) lib/dynamoid/persistence.rb:61:inblock (2 levels) in undump' dynamoid (1.0.0) lib/dynamoid/persistence.rb:60:in each' dynamoid (1.0.0) lib/dynamoid/persistence.rb:60:inblock in undump' dynamoid (1.0.0) lib/dynamoid/persistence.rb:59:in tap' dynamoid (1.0.0) lib/dynamoid/persistence.rb:59:inundump' dynamoid (1.0.0) lib/dynamoid/document.rb:133:in load' dynamoid (1.0.0) lib/dynamoid/document.rb:128:inblock in initialize' activesupport (4.1.14.2) lib/active_support/callbacks.rb:113:in call' activesupport (4.1.14.2) lib/active_support/callbacks.rb:113:incall' activesupport (4.1.14.2) lib/active_support/callbacks.rb:552:in block (2 levels) in compile' activesupport (4.1.14.2) lib/active_support/callbacks.rb:502:incall' activesupport (4.1.14.2) lib/active_support/callbacks.rb:502:in call' activesupport (4.1.14.2) lib/active_support/callbacks.rb:86:inrun_callbacks' dynamoid (1.0.0) lib/dynamoid/document.rb:123:in initialize' dynamoid (1.0.0) lib/dynamoid/persistence.rb:51:innew' dynamoid (1.0.0) lib/dynamoid/persistence.rb:51:in from_database' dynamoid (1.0.0) lib/dynamoid/identity_map.rb:15:infrom_database' dynamoid (1.0.0) lib/dynamoid/dirty.rb:8:in from_database' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:143:inblock (2 levels) in records_via_scan' dynamoid (1.0.0) lib/dynamoid/adapter_plugin/aws_sdk_v2.rb:362:in <<' dynamoid (1.0.0) lib/dynamoid/adapter_plugin/aws_sdk_v2.rb:362:inblock (3 levels) in scan' dynamoid (1.0.0) lib/dynamoid/adapter_plugin/aws_sdk_v2.rb:362:in each' dynamoid (1.0.0) lib/dynamoid/adapter_plugin/aws_sdk_v2.rb:362:inblock (2 levels) in scan' dynamoid (1.0.0) lib/dynamoid/adapter_plugin/aws_sdk_v2.rb:359:in loop' dynamoid (1.0.0) lib/dynamoid/adapter_plugin/aws_sdk_v2.rb:359:inblock in scan' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:142:in each' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:142:ineach' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:142:in block in records_via_scan' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:115:in each' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:115:in each' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:115:into_a' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:115:in Array' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:115:inrecords' dynamoid (1.0.0) lib/dynamoid/criteria/chain.rb:95:in each' app/models/node.rb:925:incount' app/models/node.rb:925:in all_in_region_and_incomplete' app/controllers/nodes_controller.rb:201:inall_in_region_and_incomplete' app/controllers/nodes_controller.rb:13:in index' actionpack (4.1.14.2) lib/action_controller/metal/implicit_render.rb:4:insend_action' actionpack (4.1.14.2) lib/abstract_controller/base.rb:189:in process_action' actionpack (4.1.14.2) lib/action_controller/metal/rendering.rb:10:in process_action' actionpack (4.1.14.2) lib/abstract_controller/callbacks.rb:20:in block in process_action' activesupport (4.1.14.2) lib/active_support/callbacks.rb:113:incall' activesupport (4.1.14.2) lib/active_support/callbacks.rb:113:in call' activesupport (4.1.14.2) lib/active_support/callbacks.rb:552:inblock (2 levels) in compile' activesupport (4.1.14.2) lib/active_support/callbacks.rb:502:in call' activesupport (4.1.14.2) lib/active_support/callbacks.rb:502:incall' activesupport (4.1.14.2) lib/active_support/callbacks.rb:86:in run_callbacks' actionpack (4.1.14.2) lib/abstract_controller/callbacks.rb:19:in process_action' actionpack (4.1.14.2) lib/action_controller/metal/rescue.rb:29:in process_action' actionpack (4.1.14.2) lib/action_controller/metal/instrumentation.rb:32:inblock in process_action' activesupport (4.1.14.2) lib/active_support/notifications.rb:159:in block in instrument' activesupport (4.1.14.2) lib/active_support/notifications/instrumenter.rb:20:ininstrument' activesupport (4.1.14.2) lib/active_support/notifications.rb:159:in instrument' actionpack (4.1.14.2) lib/action_controller/metal/instrumentation.rb:30:in process_action' actionpack (4.1.14.2) lib/action_controller/metal/params_wrapper.rb:250:in process_action' actionpack (4.1.14.2) lib/abstract_controller/base.rb:136:inprocess' actionview (4.1.14.2) lib/action_view/rendering.rb:30:in process' actionpack (4.1.14.2) lib/action_controller/metal.rb:196:indispatch' actionpack (4.1.14.2) lib/action_controller/metal/rack_delegation.rb:13:in dispatch' actionpack (4.1.14.2) lib/action_controller/metal.rb:232:inblock in action' actionpack (4.1.14.2) lib/action_dispatch/routing/route_set.rb:80:in call' actionpack (4.1.14.2) lib/action_dispatch/routing/route_set.rb:80:in dispatch' actionpack (4.1.14.2) lib/action_dispatch/routing/route_set.rb:48:in call' actionpack (4.1.14.2) lib/action_dispatch/journey/router.rb:73:inblock in call' actionpack (4.1.14.2) lib/action_dispatch/journey/router.rb:59:in each' actionpack (4.1.14.2) lib/action_dispatch/journey/router.rb:59:incall' actionpack (4.1.14.2) lib/action_dispatch/routing/route_set.rb:690:in call' rack (1.5.2) lib/rack/etag.rb:23:incall' rack (1.5.2) lib/rack/conditionalget.rb:25:in call' rack (1.5.2) lib/rack/head.rb:11:incall' actionpack (4.1.14.2) lib/action_dispatch/middleware/params_parser.rb:27:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/flash.rb:254:incall' rack (1.5.2) lib/rack/session/abstract/id.rb:225:in context' rack (1.5.2) lib/rack/session/abstract/id.rb:220:incall' actionpack (4.1.14.2) lib/action_dispatch/middleware/cookies.rb:562:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/callbacks.rb:29:inblock in call' activesupport (4.1.14.2) lib/active_support/callbacks.rb:82:in run_callbacks' actionpack (4.1.14.2) lib/action_dispatch/middleware/callbacks.rb:27:incall' actionpack (4.1.14.2) lib/action_dispatch/middleware/reloader.rb:73:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/remote_ip.rb:76:incall' actionpack (4.1.14.2) lib/action_dispatch/middleware/debug_exceptions.rb:17:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/show_exceptions.rb:30:incall' railties (4.1.14.2) lib/rails/rack/logger.rb:38:in call_app' railties (4.1.14.2) lib/rails/rack/logger.rb:20:inblock in call' activesupport (4.1.14.2) lib/active_support/tagged_logging.rb:68:in block in tagged' activesupport (4.1.14.2) lib/active_support/tagged_logging.rb:26:intagged' activesupport (4.1.14.2) lib/active_support/tagged_logging.rb:68:in tagged' railties (4.1.14.2) lib/rails/rack/logger.rb:20:incall' /opt/brazil-pkg-cache/packages/AmazonRailsLogger/AmazonRailsLogger-4.0.80.55/RHEL5_64/DEV.STD.PTHREAD/build/ruby1.9/site_ruby/1.9.1/amazon/set_request_id.rb:9:in call' /opt/brazil-pkg-cache/packages/AmazonRailsLogger/AmazonRailsLogger-4.0.80.55/RHEL5_64/DEV.STD.PTHREAD/build/ruby1.9/site_ruby/1.9.1/amazon/set_request_id.rb:9:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/request_id.rb:21:in call' rack (1.5.2) lib/rack/methodoverride.rb:21:incall' rack (1.5.2) lib/rack/runtime.rb:17:in call' activesupport (4.1.14.2) lib/active_support/cache/strategy/local_cache_middleware.rb:26:incall' rack (1.5.2) lib/rack/lock.rb:17:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/static.rb:84:incall' rack (1.5.2) lib/rack/sendfile.rb:112:in call' railties (4.1.14.2) lib/rails/engine.rb:514:incall' railties (4.1.14.2) lib/rails/application.rb:144:in call' railties (4.1.14.2) lib/rails/railtie.rb:194:inpublic_send' railties (4.1.14.2) lib/rails/railtie.rb:194:in method_missing' rack (1.5.2) lib/rack/lint.rb:49:in_call' rack (1.5.2) lib/rack/lint.rb:37:in call' rack (1.5.2) lib/rack/showexceptions.rb:24:incall' rack (1.5.2) lib/rack/commonlogger.rb:33:in call' rack (1.5.2) lib/rack/chunked.rb:43:incall' rack (1.5.2) lib/rack/content_length.rb:14:in call' rack (1.5.2) lib/rack/handler/webrick.rb:60:inservice' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/webrick/httpserver.rb:138:in service' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/webrick/httpserver.rb:94:in run' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/webrick/server.rb:191:in `block in start_thread'

Can you please help me in this?

On Sun, Jul 31, 2016 at 6:51 PM, Agustin Cavilliotti < notifications@github.com> wrote:

Look into your stack trace:

[...]

aws-sdk (1.20.0) lib/aws/core/client.rb:467:in client_request' (eval):3:inscan' dynamoid (1.0.0) lib/dynamoid/adapter_plugin/aws_sdk_v2.rb:360:in block (2 levels) in #[...]

You are using aws-sdk 1.x that's not supported by dynamoid 1.x

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Dynamoid/Dynamoid/issues/90#issuecomment-236429561, or mute the thread https://github.com/notifications/unsubscribe-auth/AIP0YVRtjLKzPSZZ54dxgkslI1QKkstTks5qbKFHgaJpZM4JXR0r .

Thanks and Regards, Ronak Lakhwani Computer Science and Engineering, IIT Roorkee Contact : 8477935097

cignoir commented 8 years ago

Just for your information, rails 4.1.14.2 requires ruby1.9.3 or higher. https://rubygems.org/gems/rails/versions/4.1.14.2

I don't know whether to be directly related to that error, but you should migrate ruby version from 1.9.1 to 1.9.3+.

raunaklakhwani commented 8 years ago

Hi,

I am making the dynamodb connection through

Aws.config.update({ region: region, credentials: Aws::Credentials.new(a.public.text, a.private.text), })

I am getting the error while executing the line :

Node.where(:is_submitted => 't').where(:is_signed_off => 'f').count

Error :

Seahorse::Client::NetworkingError

SSL_connect returned=1 errno=0 state=error: certificate verify failed

Logs :

/home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/net/http.rb:800:in connect' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/net/http.rb:800:inblock in connect' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/timeout.rb:69:in timeout' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/timeout.rb:100:intimeout' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/net/http.rb:800:in connect' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/net/http.rb:756:indo_start' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/net/http.rb:751:in start' aws-sdk-core (2.3.19) lib/seahorse/client/net_http/connection_pool.rb:281:instart_session' aws-sdk-core (2.3.19) lib/seahorse/client/net_http/connection_pool.rb:93:in session_for' aws-sdk-core (2.3.19) lib/seahorse/client/net_http/handler.rb:116:insession' aws-sdk-core (2.3.19) lib/seahorse/client/net_http/handler.rb:68:in transmit' aws-sdk-core (2.3.19) lib/seahorse/client/net_http/handler.rb:42:incall' aws-sdk-core (2.3.19) lib/seahorse/client/plugins/content_length.rb:12:in call' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/dynamodb_crc32_validation.rb:27:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/json/error_handler.rb:8:in call' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/request_signer.rb:84:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:87:in call' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:118:inretry_request' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:101:in retry_if_possible' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:89:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:118:in retry_request' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:101:inretry_if_possible' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:89:in call' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:118:inretry_request' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:101:in retry_if_possible' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:89:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:118:in retry_request' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:101:inretry_if_possible' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:89:in call' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:118:inretry_request' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:101:in retry_if_possible' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:89:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:118:in retry_request' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:101:inretry_if_possible' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:89:in call' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:118:inretry_request' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:101:in retry_if_possible' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:89:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:118:in retry_request' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:101:inretry_if_possible' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:89:in call' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:118:inretry_request' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:101:in retry_if_possible' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:89:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:118:in retry_request' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:101:inretry_if_possible' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/retry_errors.rb:89:in call' aws-sdk-core (2.3.19) lib/aws-sdk-core/json/handler.rb:11:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/user_agent.rb:12:in call' aws-sdk-core (2.3.19) lib/seahorse/client/plugins/endpoint.rb:41:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/param_validator.rb:21:in call' aws-sdk-core (2.3.19) lib/seahorse/client/plugins/raise_response_errors.rb:14:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/dynamodb_simple_attributes.rb:112:in call' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/param_converter.rb:20:incall' aws-sdk-core (2.3.19) lib/aws-sdk-core/plugins/response_paging.rb:26:in call' aws-sdk-core (2.3.19) lib/seahorse/client/plugins/response_target.rb:21:incall' aws-sdk-core (2.3.19) lib/seahorse/client/request.rb:70:in send_request' aws-sdk-core (2.3.19) lib/seahorse/client/base.rb:207:inblock (2 levels) in define_operation_methods' dynamoid (1.1.0) lib/dynamoid/adapter_plugin/aws_sdk_v2.rb:368:in block (2 levels) in scan' dynamoid (1.1.0) lib/dynamoid/adapter_plugin/aws_sdk_v2.rb:367:inloop' dynamoid (1.1.0) lib/dynamoid/adapter_plugin/aws_sdk_v2.rb:367:in block in scan' dynamoid (1.1.0) lib/dynamoid/criteria/chain.rb:142:ineach' dynamoid (1.1.0) lib/dynamoid/criteria/chain.rb:142:in each' dynamoid (1.1.0) lib/dynamoid/criteria/chain.rb:142:inblock in records_via_scan' dynamoid (1.1.0) lib/dynamoid/criteria/chain.rb:115:in each' dynamoid (1.1.0) lib/dynamoid/criteria/chain.rb:115:ineach' dynamoid (1.1.0) lib/dynamoid/criteria/chain.rb:115:in to_a' dynamoid (1.1.0) lib/dynamoid/criteria/chain.rb:115:inArray' dynamoid (1.1.0) lib/dynamoid/criteria/chain.rb:115:in records' dynamoid (1.1.0) lib/dynamoid/criteria/chain.rb:95:ineach' app/controllers/application_controller.rb:108:in count' app/controllers/application_controller.rb:108:inset_global_counts' activesupport (4.1.14.2) lib/active_support/callbacks.rb:429:in block in make_lambda' activesupport (4.1.14.2) lib/active_support/callbacks.rb:143:incall' activesupport (4.1.14.2) lib/active_support/callbacks.rb:143:in block in halting_and_conditional' activesupport (4.1.14.2) lib/active_support/callbacks.rb:501:incall' activesupport (4.1.14.2) lib/active_support/callbacks.rb:501:in block in call' activesupport (4.1.14.2) lib/active_support/callbacks.rb:501:ineach' activesupport (4.1.14.2) lib/active_support/callbacks.rb:501:in call' activesupport (4.1.14.2) lib/active_support/callbacks.rb:86:inrun_callbacks' actionpack (4.1.14.2) lib/abstract_controller/callbacks.rb:19:in process_action' actionpack (4.1.14.2) lib/action_controller/metal/rescue.rb:29:inprocess_action' actionpack (4.1.14.2) lib/action_controller/metal/instrumentation.rb:32:in block in process_action' activesupport (4.1.14.2) lib/active_support/notifications.rb:159:inblock in instrument' activesupport (4.1.14.2) lib/active_support/notifications/instrumenter.rb:20:in instrument' activesupport (4.1.14.2) lib/active_support/notifications.rb:159:ininstrument' actionpack (4.1.14.2) lib/action_controller/metal/instrumentation.rb:30:in process_action' actionpack (4.1.14.2) lib/action_controller/metal/params_wrapper.rb:250:inprocess_action' actionpack (4.1.14.2) lib/abstract_controller/base.rb:136:in process' actionview (4.1.14.2) lib/action_view/rendering.rb:30:inprocess' actionpack (4.1.14.2) lib/action_controller/metal.rb:196:in dispatch' actionpack (4.1.14.2) lib/action_controller/metal/rack_delegation.rb:13:indispatch' actionpack (4.1.14.2) lib/action_controller/metal.rb:232:in block in action' actionpack (4.1.14.2) lib/action_dispatch/routing/route_set.rb:80:incall' actionpack (4.1.14.2) lib/action_dispatch/routing/route_set.rb:80:in dispatch' actionpack (4.1.14.2) lib/action_dispatch/routing/route_set.rb:48:incall' actionpack (4.1.14.2) lib/action_dispatch/journey/router.rb:73:in block in call' actionpack (4.1.14.2) lib/action_dispatch/journey/router.rb:59:ineach' actionpack (4.1.14.2) lib/action_dispatch/journey/router.rb:59:in call' actionpack (4.1.14.2) lib/action_dispatch/routing/route_set.rb:690:incall' rack (1.5.2) lib/rack/etag.rb:23:in call' rack (1.5.2) lib/rack/conditionalget.rb:25:incall' rack (1.5.2) lib/rack/head.rb:11:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/params_parser.rb:27:incall' actionpack (4.1.14.2) lib/action_dispatch/middleware/flash.rb:254:in call' rack (1.5.2) lib/rack/session/abstract/id.rb:225:incontext' rack (1.5.2) lib/rack/session/abstract/id.rb:220:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/cookies.rb:562:incall' actionpack (4.1.14.2) lib/action_dispatch/middleware/callbacks.rb:29:in block in call' activesupport (4.1.14.2) lib/active_support/callbacks.rb:82:inrun_callbacks' actionpack (4.1.14.2) lib/action_dispatch/middleware/callbacks.rb:27:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/reloader.rb:73:incall' actionpack (4.1.14.2) lib/action_dispatch/middleware/remote_ip.rb:76:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/debug_exceptions.rb:17:incall' actionpack (4.1.14.2) lib/action_dispatch/middleware/show_exceptions.rb:30:in call' railties (4.1.14.2) lib/rails/rack/logger.rb:38:incall_app' railties (4.1.14.2) lib/rails/rack/logger.rb:20:in block in call' activesupport (4.1.14.2) lib/active_support/tagged_logging.rb:68:inblock in tagged' activesupport (4.1.14.2) lib/active_support/tagged_logging.rb:26:in tagged' activesupport (4.1.14.2) lib/active_support/tagged_logging.rb:68:intagged' railties (4.1.14.2) lib/rails/rack/logger.rb:20:in call' /opt/brazil-pkg-cache/packages/AmazonRailsLogger/AmazonRailsLogger-4.0.80.55/RHEL5_64/DEV.STD.PTHREAD/build/ruby1.9/site_ruby/1.9.1/amazon/set_request_id.rb:9:incall' /opt/brazil-pkg-cache/packages/AmazonRailsLogger/AmazonRailsLogger-4.0.80.55/RHEL5_64/DEV.STD.PTHREAD/build/ruby1.9/site_ruby/1.9.1/amazon/set_request_id.rb:9:in call' actionpack (4.1.14.2) lib/action_dispatch/middleware/request_id.rb:21:incall' rack (1.5.2) lib/rack/methodoverride.rb:21:in call' rack (1.5.2) lib/rack/runtime.rb:17:incall' activesupport (4.1.14.2) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in call' rack (1.5.2) lib/rack/lock.rb:17:incall' actionpack (4.1.14.2) lib/action_dispatch/middleware/static.rb:84:in call' rack (1.5.2) lib/rack/sendfile.rb:112:incall' railties (4.1.14.2) lib/rails/engine.rb:514:in call' railties (4.1.14.2) lib/rails/application.rb:144:incall' railties (4.1.14.2) lib/rails/railtie.rb:194:in public_send' railties (4.1.14.2) lib/rails/railtie.rb:194:inmethod_missing' rack (1.5.2) lib/rack/lint.rb:49:in _call' rack (1.5.2) lib/rack/lint.rb:37:incall' rack (1.5.2) lib/rack/showexceptions.rb:24:in call' rack (1.5.2) lib/rack/commonlogger.rb:33:incall' rack (1.5.2) lib/rack/chunked.rb:43:in call' rack (1.5.2) lib/rack/content_length.rb:14:incall' rack (1.5.2) lib/rack/handler/webrick.rb:60:in service' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/webrick/httpserver.rb:138:inservice' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/webrick/httpserver.rb:94:in run' /home/lakhwani/FCLaunchRequirement/env/FCLaunchRequirementWebsite-1.0/runtime/ruby1.9/1.9.1/webrick/server.rb:191:inblock in start_thread'

Can any one help me in this?

pboling commented 8 years ago

You do not need to do that at all, and that may be your problem. Delete the Aws.config stuff and follow the README of this project.

Here is an example config:

Dynamoid.configure do |config|
  config.adapter = 'aws_sdk_v2' # This adapter establishes a connection to the DynamoDB servers using Amazon's own AWS gem.
  config.namespace = "dynamoid_app_#{Rails.env}" # To namespace tables created by Dynamoid from other tables you might have. Set to nil to avoid namespacing.
  config.warn_on_scan = true # Output a warning to the logger when you perform a scan rather than a query on a table.
  config.read_capacity = 5 # Read capacity for your tables
  config.write_capacity = 5 # Write capacity for your tables
  if Rails.env.development? || Rails.env.test?
    config.endpoint = 'http://localhost:8000'
  else
    # A default endpoint is constructed from the region setting: ENV["AWS_REGION"]
  end
  #   This is useful for testing with Amazon Local DB:
  #     http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tools.DynamoDBLocal.html
end

In order for this to work you must set your keys as ENV variables correctly, such as:

export AWS_REGION=us-east-1

There are probably other keys you need to set as well for the secret.