I am trying to run a query from my Ruby code.

Here is how I connected to the db, which seemed to work:

  server = ::AllegroGraph::Server.new :username => "user"  , :password => "test_password"
  repository = AllegroGraph::Repository.new server , "repo_name"

Here is the line of code that broke things:

repository.statements.find :subject => "<SomeTestValue>"

Here is the error dump:

/home/agenadinik/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:644:in `initialize'
/home/agenadinik/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:644:in `open'
/home/agenadinik/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:644:in `block in connect'
/home/agenadinik/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/timeout.rb:44:in `timeout'
/home/agenadinik/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/timeout.rb:87:in `timeout'
/home/agenadinik/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:644:in `connect'
/home/agenadinik/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:637:in `do_start'
/home/agenadinik/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:626:in `start'
/home/agenadinik/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:490:in `start'
mysql2/ruby/1.9.1/gems/transport-1.0.1/lib/transport/http.rb:22:in `perform_request'
mysql2/ruby/1.9.1/gems/transport-1.0.1/lib/transport/http.rb:14:in `perform'
mysql2/ruby/1.9.1/gems/transport-1.0.1/lib/transport/json.rb:25:in `perform_http_transport'
mysql2/ruby/1.9.1/gems/transport-1.0.1/lib/transport/json.rb:17:in `perform'
mysql2/ruby/1.9.1/gems/transport-1.0.1/lib/transport/common.rb:33:in `request'
mysql2/ruby/1.9.1/gems/agraph-0.1.4/lib/allegro_graph/server.rb:31:in `request_json'
mysql2/ruby/1.9.1/gems/agraph-0.1.4/lib/allegro_graph/repository.rb:32:in `request_json'
mysql2/ruby/1.9.1/gems/agraph-0.1.4/lib/allegro_graph/proxy/statements.rb:54:in `find'
app/controllers/home_controller.rb:18:in `index'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_controller/metal/implicit_render.rb:5:in `send_action'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/abstract_controller/base.rb:150:in `process_action'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_controller/metal/rendering.rb:11:in `process_action'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
mysql2/ruby/1.9.1/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:436:in `_run__1065695677__process_action__192718885__callbacks'
mysql2/ruby/1.9.1/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:410:in `_run_process_action_callbacks'
mysql2/ruby/1.9.1/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:94:in `run_callbacks'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/abstract_controller/callbacks.rb:17:in `process_action'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
mysql2/ruby/1.9.1/gems/activesupport-3.0.7/lib/active_support/notifications.rb:52:in `block in instrument'
mysql2/ruby/1.9.1/gems/activesupport-3.0.7/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
mysql2/ruby/1.9.1/gems/activesupport-3.0.7/lib/active_support/notifications.rb:52:in `instrument'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_controller/metal/rescue.rb:17:in `process_action'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/abstract_controller/base.rb:119:in `process'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/abstract_controller/rendering.rb:41:in `process'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_controller/metal.rb:138:in `dispatch'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_controller/metal.rb:178:in `block in action'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_dispatch/routing/route_set.rb:62:in `call'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_dispatch/routing/route_set.rb:62:in `dispatch'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_dispatch/routing/route_set.rb:27:in `call'
mysql2/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb:148:in `block in call'
mysql2/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:93:in `block in recognize'
mysql2/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:68:in `optimized_each'
mysql2/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:92:in `recognize'
mysql2/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb:139:in `call'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_dispatch/routing/route_set.rb:493:in `call'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_dispatch/middleware/head.rb:14:in `call'
mysql2/ruby/1.9.1/gems/rack-1.2.2/lib/rack/methodoverride.rb:24:in `call'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_dispatch/middleware/flash.rb:182:in `call'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_dispatch/middleware/cookies.rb:302:in `call'
mysql2/ruby/1.9.1/gems/activerecord-3.0.7/lib/active_record/query_cache.rb:32:in `block in call'
mysql2/ruby/1.9.1/gems/activerecord-3.0.7/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'
mysql2/ruby/1.9.1/gems/activerecord-3.0.7/lib/active_record/query_cache.rb:12:in `cache'
mysql2/ruby/1.9.1/gems/activerecord-3.0.7/lib/active_record/query_cache.rb:31:in `call'
mysql2/ruby/1.9.1/gems/activerecord-3.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:354:in `call'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_dispatch/middleware/callbacks.rb:46:in `block in call'
mysql2/ruby/1.9.1/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:416:in `_run_call_callbacks'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_dispatch/middleware/callbacks.rb:44:in `call'
mysql2/ruby/1.9.1/gems/rack-1.2.2/lib/rack/sendfile.rb:107:in `call'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
mysql2/ruby/1.9.1/gems/railties-3.0.7/lib/rails/rack/logger.rb:13:in `call'
mysql2/ruby/1.9.1/gems/rack-1.2.2/lib/rack/runtime.rb:17:in `call'
mysql2/ruby/1.9.1/gems/activesupport-3.0.7/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
mysql2/ruby/1.9.1/gems/rack-1.2.2/lib/rack/lock.rb:11:in `block in call'
<internal:prelude>:10:in `synchronize'
mysql2/ruby/1.9.1/gems/rack-1.2.2/lib/rack/lock.rb:11:in `call'
mysql2/ruby/1.9.1/gems/actionpack-3.0.7/lib/action_dispatch/middleware/static.rb:30:in `call'
mysql2/ruby/1.9.1/gems/railties-3.0.7/lib/rails/application.rb:168:in `call'
mysql2/ruby/1.9.1/gems/railties-3.0.7/lib/rails/application.rb:77:in `method_missing'
mysql2/ruby/1.9.1/gems/railties-3.0.7/lib/rails/rack/log_tailer.rb:14:in `call'
mysql2/ruby/1.9.1/gems/rack-1.2.2/lib/rack/content_length.rb:13:in `call'
mysql2/ruby/1.9.1/gems/rack-1.2.2/lib/rack/handler/webrick.rb:52:in `service'
/home/agenadinik/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
/home/agenadinik/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
/home/agenadinik/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'

The error does not point to any explicit single problem as far as I can see. Any ideas what caused the error?

asked 09 May '11, 15:04

Genadinik's gravatar image

Genadinik
96519
accept rate: 66%


It turned out to be an issue with not enough parameters being set in my server config string. Solved.

permanent link

answered 09 May '11, 15:37

Genadinik's gravatar image

Genadinik
96519
accept rate: 66%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×1,328
×208
×166
×71
×47

question asked: 09 May '11, 15:04

question was seen: 1,060 times

last updated: 09 May '11, 15:37