Problems with mongoid querying - ruby-on-rails

I'm using mongoid 3.0 with rails 3.2.3.
mongoid.yml looks like:
development:
sessions:
default:
database: dana-x
hosts: localhost
Server running with no problem. But when i've trying to execute following code:
User.where(:login => user_name).first
Server returns NoMethod error:
undefined method `map' for "localhost":String
.bundle/ruby/1.9.1/gems/moped-1.0.0.beta/lib/moped/cluster.rb:20:in `initialize'
.bundle/ruby/1.9.1/gems/moped-1.0.0.beta/lib/moped/session.rb:52:in `new'
.bundle/ruby/1.9.1/gems/moped-1.0.0.beta/lib/moped/session.rb:52:in `initialize'
.bundle/ruby/1.9.1/bundler/gems/mongoid-cb1312e5385c/lib/mongoid/sessions/factory.rb:60:in `new'
.bundle/ruby/1.9.1/bundler/gems/mongoid-cb1312e5385c/lib/mongoid/sessions/factory.rb:60:in `create_session'
.bundle/ruby/1.9.1/bundler/gems/mongoid-cb1312e5385c/lib/mongoid/sessions/factory.rb:41:in `default'
.bundle/ruby/1.9.1/bundler/gems/mongoid-cb1312e5385c/lib/mongoid/sessions.rb:109:in `default'
.bundle/ruby/1.9.1/bundler/gems/mongoid-cb1312e5385c/lib/mongoid/sessions.rb:354:in `__session__'
.bundle/ruby/1.9.1/bundler/gems/mongoid-cb1312e5385c/lib/mongoid/sessions.rb:199:in `mongo_session'
.bundle/ruby/1.9.1/bundler/gems/mongoid-cb1312e5385c/lib/mongoid/sessions.rb:157:in `collection'
.bundle/ruby/1.9.1/bundler/gems/mongoid-cb1312e5385c/lib/mongoid/contextual/mongo.rb:208:in `initialize'
.bundle/ruby/1.9.1/bundler/gems/mongoid-cb1312e5385c/lib/mongoid/contextual.rb:47:in `new'
.bundle/ruby/1.9.1/bundler/gems/mongoid-cb1312e5385c/lib/mongoid/contextual.rb:47:in `create_context'
.bundle/ruby/1.9.1/bundler/gems/mongoid-cb1312e5385c/lib/mongoid/contextual.rb:30:in `context'
.bundle/ruby/1.9.1/bundler/gems/mongoid-cb1312e5385c/lib/mongoid/contextual.rb:20:in `rescue in first'
.bundle/ruby/1.9.1/bundler/gems/mongoid-cb1312e5385c/lib/mongoid/contextual.rb:18:in `first'
app/controllers/feed_controller.rb:5:in `index'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/abstract_controller/base.rb:167:in `process_action'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal/rendering.rb:10:in `process_action'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
.bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:414:in `_run__980518159__process_action__502500855__callbacks'
.bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:405:in `__run_callback'
.bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
.bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:81:in `run_callbacks'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/abstract_controller/callbacks.rb:17:in `process_action'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal/rescue.rb:29:in `process_action'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
.bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/notifications.rb:123:in `block in instrument'
.bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
.bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/notifications.rb:123:in `instrument'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal/params_wrapper.rb:205:in `process_action'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/abstract_controller/base.rb:121:in `process'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/abstract_controller/rendering.rb:45:in `process'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal.rb:203:in `dispatch'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal.rb:246:in `block in action'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:73:in `call'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:36:in `call'
.bundle/ruby/1.9.1/gems/journey-1.0.3/lib/journey/router.rb:68:in `block in call'
.bundle/ruby/1.9.1/gems/journey-1.0.3/lib/journey/router.rb:56:in `each'
.bundle/ruby/1.9.1/gems/journey-1.0.3/lib/journey/router.rb:56:in `call'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:600:in `call'
.bundle/ruby/1.9.1/bundler/gems/mongoid-cb1312e5385c/lib/rack/mongoid/middleware/identity_map.rb:33:in `block in call'
.bundle/ruby/1.9.1/bundler/gems/mongoid-cb1312e5385c/lib/mongoid/unit_of_work.rb:39:in `unit_of_work'
.bundle/ruby/1.9.1/bundler/gems/mongoid-cb1312e5385c/lib/rack/mongoid/middleware/identity_map.rb:33:in `call'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
.bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call'
.bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/conditionalget.rb:25:in `call'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/head.rb:14:in `call'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/flash.rb:242:in `call'
.bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context'
.bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/cookies.rb:338:in `call'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
.bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:405:in `_run__647823261__call__262699075__callbacks'
.bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:405:in `__run_callback'
.bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
.bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:81:in `run_callbacks'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/reloader.rb:65:in `call'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
.bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/rack/logger.rb:26:in `call_app'
.bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/rack/logger.rb:16:in `call'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/request_id.rb:22:in `call'
.bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
.bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call'
.bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
.bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call'
.bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/static.rb:62:in `call'
.bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/engine.rb:479:in `call'
.bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/application.rb:220:in `call'
.bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/content_length.rb:14:in `call'
.bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/rack/log_tailer.rb:14:in `call'
.bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/handler/webrick.rb:59:in `service'
/home/scepion1d/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/home/scepion1d/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/home/scepion1d/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
I think that problem in connection to db. Does anybody know how to solve this problem?

For mongoid 3.0 mongoid.yml should looks like:
development:
sessions:
default:
database: dana-x
hosts:
- localhost:27017

My default mongoid.yml contains:
development:
host: localhost
database: mydatabse
Test your config without sessions in your mongoid.yml

host expects a single host definition, hosts for an array (i.e. with replication)
development:
sessions:
default:
database: dana-x
host: localhost
or if you really do have replica sets, you can define like this (covered in the docs here):
development:
sessions:
default:
database: dana-x
hosts:
- - 10.10.10.1
- 27017
- - 10.10.10.2
- 27017
- - 10.10.10.3
- 27017

Related

Can I use oracle_enhanced adapter in vanity gem for AB Testing?

For my production database, I am using oracle_enhanced adapter. Is this supported by vanity gem?
From https://github.com/assaf/vanity, it says: "Vanity supports multiple SQL stores (like MySQL, MariaDB, Postgres, Sqlite, etc.) using ActiveRecord, which is built into Rails".
I am not sure if this etc includes Oracle.
I tried using the below in my config/vanity.yml:
production:
adapter: oracle_enhanced
host: mydb.XXX.com
username: XXX
password: XXX
port: XXXX
database: mydb
But what I get is the error message below:
Could not find oracle_enhanced in your load path (RuntimeError)
My config/database.yml is actually using adapter: oracle_enhanced.
Any advice what I'm missing?
[UPDATED]
Below is the stack trace:
Could not find oracle_enhanced in your load path (RuntimeError)
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/adapters.rb:16:in `rescue in establish_connection'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/adapters.rb:13:in `establish_connection'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/connection.rb:95:in `establish_connection'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/connection.rb:68:in `setup_connection'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/connection.rb:36:in `initialize'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/vanity.rb:98:in `new'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/vanity.rb:98:in `connect!'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/vanity.rb:69:in `connection'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/frameworks/rails.rb:12:in `block in load!'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/lazy_load_hooks.rb:34:in `call'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/lazy_load_hooks.rb:42:in `each'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/application/finisher.rb:59:in `block in <module:Finisher>'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/initializable.rb:30:in `instance_exec'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/initializable.rb:30:in `run'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/initializable.rb:54:in `each'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/initializable.rb:54:in `run_initializers'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/application.rb:136:in `initialize!'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/si/si_trunk/config/environment.rb:5:in `<top (required)>'
config.ru:3:in `require'
config.ru:3:in `block in <main>'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/builder.rb:51:in `instance_eval'
/home/si/si_trunk/vendor/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/builder.rb:51:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/usr/local/httpd/passenger/helper-scripts/rack-preloader.rb:105:in `eval'
/usr/local/httpd/passenger/helper-scripts/rack-preloader.rb:105:in `preload_app'
/usr/local/httpd/passenger/helper-scripts/rack-preloader.rb:150:in `<module:App>'
/usr/local/httpd/passenger/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/usr/local/httpd/passenger/helper-scripts/rack-preloader.rb:28:in `<main>'
Then I edited the config/vanity.yml to:
production:
adapter: active_record
active_record_adapter: oracle_enhanced
host: mydb.XXX.com
database: mydb
port: XXXX
username: XXX
password: XXX
This is the stack trace after updating the vanity.yml:
NameError ("DESC vanity_experiments" failed; does it exist?):
vendor/bundle/ruby/2.0.0/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_connection.rb:76:in `describe'
vendor/bundle/ruby/2.0.0/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:219:in `rescue in describe'
vendor/bundle/ruby/2.0.0/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:214:in `describe'
vendor/bundle/ruby/2.0.0/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:1074:in `columns_without_cache'
vendor/bundle/ruby/2.0.0/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:1063:in `columns'
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.20/lib/active_record/connection_adapters/schema_cache.rb:12:in `block in initialize'
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.20/lib/active_record/model_schema.rb:229:in `yield'
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.20/lib/active_record/model_schema.rb:229:in `columns'
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.20/lib/active_record/model_schema.rb:249:in `column_names'
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.20/lib/active_record/model_schema.rb:262:in `column_methods_hash'
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.20/lib/active_record/dynamic_matchers.rb:74:in `all_attributes_exists?'
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.20/lib/active_record/dynamic_matchers.rb:27:in `method_missing'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/adapters/active_record_adapter.rb:180:in `set_experiment_created_at'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/experiment/base.rb:159:in `save'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/experiment/ab_test.rb:544:in `save'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/experiment/definition.rb:21:in `define'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/experiment/ab_test.rb:708:in `ab_test'
/experiments/price_options.rb:1:in `new_binding'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/experiment/base.rb:24:in `eval'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/experiment/base.rb:24:in `block in load'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/experiment/base.rb:22:in `instance_eval'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/experiment/base.rb:22:in `load'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/playground.rb:248:in `block in set_experiments'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/playground.rb:247:in `each'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/playground.rb:247:in `set_experiments'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/playground.rb:26:in `initialize'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/vanity.rb:137:in `new'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/vanity.rb:137:in `load!'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/vanity.rb:127:in `playground'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/templates.rb:25:in `custom_template_path_valid?'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/templates.rb:15:in `determine_template_directory'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/templates.rb:4:in `initialize'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/templates.rb:37:in `new'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/templates.rb:37:in `template'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/frameworks/rails.rb:365:in `index'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/abstract_controller/base.rb:167:in `process_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_controller/metal/rendering.rb:10:in `process_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:558:in `block in _run__1055270493__process_action__1054591083__callbacks'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_1772'
vendor/bundle/ruby/2.0.0/gems/vanity-2.2.1/lib/vanity/frameworks/rails.rb:146:in `vanity_context_filter'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_1772'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:414:in `_run__1055270493__process_action__1054591083__callbacks'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:405:in `__run_callback'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/abstract_controller/callbacks.rb:17:in `process_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_controller/metal/rescue.rb:29:in `process_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/notifications.rb:123:in `block in instrument'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/notifications.rb:123:in `instrument'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.20/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/rails3/action_controller.rb:30:in `block in process_action'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:362:in `perform_action_with_newrelic_trace'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/rails3/action_controller.rb:25:in `process_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/abstract_controller/base.rb:121:in `process'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/abstract_controller/rendering.rb:45:in `process'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_controller/metal.rb:203:in `dispatch'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_controller/metal.rb:246:in `block in action'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/routing/route_set.rb:73:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/routing/route_set.rb:36:in `call'
vendor/bundle/ruby/2.0.0/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
vendor/bundle/ruby/2.0.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
vendor/bundle/ruby/2.0.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/routing/route_set.rb:608:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/rack/agent_hooks.rb:30:in `traced_call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/rack/browser_monitoring.rb:32:in `traced_call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-attack-3.0.0/lib/rack/attack.rb:56:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/etag.rb:23:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/conditionalget.rb:25:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/head.rb:14:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/flash.rb:242:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/session/abstract/id.rb:210:in `context'
vendor/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/session/abstract/id.rb:205:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/cookies.rb:341:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.20/lib/active_record/query_cache.rb:64:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.20/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:405:in `_run__665799391__call__857586578__callbacks'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:405:in `__run_callback'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/rack/logger.rb:32:in `call_app'
vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/rack/logger.rb:16:in `block in call'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/tagged_logging.rb:22:in `tagged'
vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/rack/logger.rb:16:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.20/lib/action_dispatch/middleware/request_id.rb:22:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/methodoverride.rb:21:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/runtime.rb:17:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.20/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.4.7/lib/rack/lock.rb:15:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-cache-1.6.1/lib/rack/cache/context.rb:140:in `forward'
vendor/bundle/ruby/2.0.0/gems/rack-cache-1.6.1/lib/rack/cache/context.rb:249:in `fetch'
vendor/bundle/ruby/2.0.0/gems/rack-cache-1.6.1/lib/rack/cache/context.rb:189:in `lookup'
vendor/bundle/ruby/2.0.0/gems/rack-cache-1.6.1/lib/rack/cache/context.rb:66:in `call!'
vendor/bundle/ruby/2.0.0/gems/rack-cache-1.6.1/lib/rack/cache/context.rb:51:in `call'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/engine.rb:484:in `call'
vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/application.rb:231:in `call'
vendor/bundle/ruby/2.0.0/gems/railties-3.2.20/lib/rails/railtie/configurable.rb:30:in `method_missing'
vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.13.0.299/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
/usr/local/httpd/passenger/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request'
/usr/local/httpd/passenger/lib/phusion_passenger/request_handler/thread_handler.rb:140:in `accept_and_process_next_request'
/usr/local/httpd/passenger/lib/phusion_passenger/request_handler/thread_handler.rb:108:in `main_loop'
/usr/local/httpd/passenger/lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads'
Is this because the username in the config is not the owner of the table? But, actually, I already granted access (select, insert, update, delete) to the username in the config.
This is my VANITY_EXPERMINETS_TABLE:
COLUMN_NAME DATA_TYPE NULLABLE
EXPERIMENT_ID VARCHAR2(50 BYTE) NO
OUTCOME NUMBER(11,0) YES
ENABLED CHAR(1 BYTE) YES
CREATED_AT DATE YES
COMPLETED_AT DATE YES
Yes - Vanity will work with ActiveRecord database adapters.
As #ksarunas points out, you'll need to add the adapter to your gemfile and make sure that it's required appropriately.
Also, make sure to use the connection setup described in the README, paraphrased for this adapter:
# config/vanity.yml
development:
adapter: active_record
active_record_adapter: oracle_enhanced
# database: ...
# host: ...
test:
adapter: active_record
active_record_adapter: default # Can also use the default AR connection, no need to respecify all of the connection params
collecting: false
production:
adapter: active_record
active_record_adapter: default
Also make sure to run the migrations to create the tables:
$ rails generate vanity
$ rake db:migrate

I am getting this warning Warning: Error loading

I am upgrading from rails 2.3 to rails 3.2. I have models divided into sub folders. Just like there is a model app/models/ad/ad.rb the other app/models/ad/ad_city.rb but inside the model it is written as:
class Ad < ActiveRecord::Base
class AdCity < ActiveRecord::Base
and not:
class Ad::Ad < ActiveRecord::Base
class Ad::AdCity < ActiveRecord::Base
I have in my application.rb:
config.autoload_paths += Dir[Rails.root.join('app', 'models', '{**}')]
even I tried including each folder in config.autoload_paths. But it give me a thousand lines warning:
Warning: Error loading /home/deep/projects/upgrade/models/myapp/app/models/ad/ad_city.rb:
uninitialized constant Ad::AdCity
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/inflector/methods.rb:230:in `block in constantize'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/inflector/methods.rb:229:in `each'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/inflector/methods.rb:229:in `constantize'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/core_ext/string/inflections.rb:54:in `constantize'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx/context.rb:64:in `block (2 levels) in load_models'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx/context.rb:54:in `each'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx/context.rb:54:in `block in load_models'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx/context.rb:53:in `each'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx/context.rb:53:in `load_models'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx/context.rb:15:in `prepare'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx.rb:81:in `block in context'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx.rb:78:in `synchronize'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx.rb:78:in `context'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx/active_record.rb:162:in `define_index'
/home/deep/projects/upgrade/models/myapp/app/models/user/user_indexes.rb:6:in `included'
/home/deep/projects/upgrade/models/myapp/app/models/user/user.rb:295:in `include'
/home/deep/projects/upgrade/models/myapp/app/models/user/user.rb:295:in `<class:User>'
/home/deep/projects/upgrade/models/myapp/app/models/user/user.rb:1:in `<top (required)>'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/bundler/gems/rails-dev-boost-bf49caca6670/lib/rails_development_boost/dependencies_patch.rb:364:in `block in load_file_with_constant_tracking_internal'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/bundler/gems/rails-dev-boost-bf49caca6670/lib/rails_development_boost/dependencies_patch.rb:240:in `now_loading'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/bundler/gems/rails-dev-boost-bf49caca6670/lib/rails_development_boost/dependencies_patch.rb:364:in `load_file_with_constant_tracking_internal'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/bundler/gems/rails-dev-boost-bf49caca6670/lib/rails_development_boost/dependencies_patch.rb:234:in `block in load_file_with_constant_tracking'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/bundler/gems/rails-dev-boost-bf49caca6670/lib/rails_development_boost/dependencies_patch.rb:383:in `async_synchronize'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/bundler/gems/rails-dev-boost-bf49caca6670/lib/rails_development_boost/dependencies_patch.rb:229:in `load_file_with_constant_tracking'
/home/deep/projects/upgrade/models/myapp/lib/authenticated_system.rb:108:in `login_from_session'
/home/deep/projects/upgrade/models/myapp/lib/authenticated_system.rb:24:in `current_user'
/home/deep/projects/upgrade/models/myapp/lib/authenticated_system.rb:14:in `logged_in?'
/home/deep/projects/upgrade/models/myapp/app/controllers/application_controller.rb:288:in `set_timezone'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:429:in `_run__402496120916004207__process_action__1098406492416702350__callbacks'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_controller/metal/rescue.rb:29:in `process_action'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/notifications.rb:123:in `block in instrument'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/notifications.rb:123:in `instrument'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activerecord-3.2.19/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/abstract_controller/base.rb:121:in `process'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/abstract_controller/rendering.rb:45:in `process'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_controller/metal.rb:203:in `dispatch'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_controller/metal.rb:246:in `block in action'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/routing/route_set.rb:73:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/routing/route_set.rb:36:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/routing/route_set.rb:608:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/exception_notification-4.0.1/lib/exception_notification/rack.rb:28:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/bundler/gems/rails-dev-boost-bf49caca6670/lib/rails_development_boost/async.rb:14:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/rack-1.4.5/lib/rack/conditionalget.rb:25:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/head.rb:14:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/flash.rb:242:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/cookies.rb:341:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activerecord-3.2.19/lib/active_record/query_cache.rb:64:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:405:in `_run__2960753221531180313__call__4371824738127159201__callbacks'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/reloader.rb:65:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/better_errors-2.0.0/lib/better_errors/middleware.rb:84:in `protected_app_call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/better_errors-2.0.0/lib/better_errors/middleware.rb:79:in `better_errors_call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/better_errors-2.0.0/lib/better_errors/middleware.rb:57:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/railties-3.2.19/lib/rails/rack/logger.rb:32:in `call_app'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/railties-3.2.19/lib/rails/rack/logger.rb:16:in `block in call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/tagged_logging.rb:22:in `tagged'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/railties-3.2.19/lib/rails/rack/logger.rb:16:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/activesupport-3.2.19/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/actionpack-3.2.19/lib/action_dispatch/middleware/static.rb:63:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/railties-3.2.19/lib/rails/engine.rb:484:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/railties-3.2.19/lib/rails/application.rb:231:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/rack-1.4.5/lib/rack/content_length.rb:14:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/railties-3.2.19/lib/rails/rack/log_tailer.rb:17:in `call'
/home/deep/.rvm/gems/ruby-2.1.2#upgrade_mygemset/gems/rack-1.4.5/lib/rack/handler/webrick.rb:59:in `service'
/home/deep/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
/home/deep/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
/home/deep/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'
for all the models. It doesn't throw any error just gives warning each time my app makes any connection with the database. What should I do. Please help

How can I integrate parallel_test and thinking sphinx in cucumber tests?

I have Rails 4 app with cucumber features. In some tests i have thinking sphinx data such as:
#javascript #sphinx
Feature: Edit a service
Scenario: Editing
Given I exist as an "individual"
And I have few services as individual user
And Sphinx indexes all models
...
Then I should see I18n translation for key "views.messages.notices.add.updated"
Where #sphinx hook contains this logic:
Before('#sphinx') do
self.use_transactional_fixtures = false
ThinkingSphinx::Test.start
sleep 2 # Give some time for sphinx to start.
end
After('#sphinx') do
ThinkingSphinx::Test.stop
self.use_transactional_fixtures = true
end
And Sphinx indexes all models contains this:
Given(/^Sphinx indexes all models$/) do
ThinkingSphinx::Test.index
# Wait for Sphinx to finish loading in the new index files.
sleep 0.25 until index_finished?
end
Here is database.yml:
development:
adapter: postgresql
database: my-project_development
host: localhost
encoding: UTF8
pool: 5
test: &test
adapter: postgresql
database: my-project_test<%= ENV['TEST_ENV_NUMBER'] %>
username: my-project
password: my-project
host: localhost
encoding: UTF8
pool: 15
When I run my specs via rake parallel:features (via parallel_tests) specs with thinking sphinx ALWAYS fail:
Can't connect to MySQL server on '127.0.0.1' (61) (ThinkingSphinx::ConnectionError)
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/thinking-sphinx-3.1.0/lib/thinking_sphinx/connection.rb:90:in `rescue in query'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/thinking-sphinx-3.1.0/lib/thinking_sphinx/connection.rb:93:in `query'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/thinking-sphinx-3.1.0/lib/thinking_sphinx/connection.rb:75:in `query_all'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/thinking-sphinx-3.1.0/lib/thinking_sphinx/search/batch_inquirer.rb:17:in `block in results'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/thinking-sphinx-3.1.0/lib/thinking_sphinx/connection.rb:37:in `block in take'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/innertube-1.1.0/lib/innertube.rb:138:in `take'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/thinking-sphinx-3.1.0/lib/thinking_sphinx/connection.rb:35:in `take'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/thinking-sphinx-3.1.0/lib/thinking_sphinx/search/batch_inquirer.rb:16:in `results'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/thinking-sphinx-3.1.0/lib/thinking_sphinx/middlewares/inquirer.rb:9:in `block in call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activesupport-4.0.3/lib/active_support/notifications.rb:159:in `block in instrument'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activesupport-4.0.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activesupport-4.0.3/lib/active_support/notifications.rb:159:in `instrument'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/thinking-sphinx-3.1.0/lib/thinking_sphinx/search/context.rb:22:in `log'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/thinking-sphinx-3.1.0/lib/thinking_sphinx/middlewares/inquirer.rb:8:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/thinking-sphinx-3.1.0/lib/thinking_sphinx/middlewares/geographer.rb:11:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/thinking-sphinx-3.1.0/lib/thinking_sphinx/middlewares/sphinxql.rb:14:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/middleware-0.1.0/lib/middleware/runner.rb:31:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/middleware-0.1.0/lib/middleware/builder.rb:102:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/thinking-sphinx-3.1.0/lib/thinking_sphinx/search.rb:67:in `populate'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/thinking-sphinx-3.1.0/lib/thinking_sphinx/search.rb:113:in `method_missing'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/squeel-1.1.1/lib/squeel/adapters/active_record/relation_extensions.rb:323:in `hash'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/squeel-1.1.1/lib/squeel/adapters/active_record/relation_extensions.rb:323:in `-'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/squeel-1.1.1/lib/squeel/adapters/active_record/relation_extensions.rb:323:in `merge_resolving_duplicate_squeel_equalities'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/squeel-1.1.1/lib/squeel/adapters/active_record/relation_extensions.rb:45:in `merge'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activerecord-4.0.3/lib/active_record/relation.rb:555:in `with_default_scope'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activerecord-4.0.3/lib/active_record/relation.rb:582:in `exec_queries'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activerecord-4.0.3/lib/active_record/relation.rb:471:in `load'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activerecord-4.0.3/lib/active_record/relation.rb:220:in `to_a'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activerecord-4.0.3/lib/active_record/relation.rb:565:in `blank?'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activesupport-4.0.3/lib/active_support/core_ext/object/blank.rb:20:in `present?'
/Users/serj/Projects/my-project/app/controllers/services_controller.rb:90:in `find_services'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activesupport-4.0.3/lib/active_support/callbacks.rb:537:in `_run__1953055605195034856__process_action__callbacks'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activesupport-4.0.3/lib/active_support/callbacks.rb:80:in `run_callbacks'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/abstract_controller/callbacks.rb:17:in `process_action'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_controller/metal/rescue.rb:29:in `process_action'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activesupport-4.0.3/lib/active_support/notifications.rb:159:in `block in instrument'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activesupport-4.0.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activesupport-4.0.3/lib/active_support/notifications.rb:159:in `instrument'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activerecord-4.0.3/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/abstract_controller/base.rb:136:in `process'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/abstract_controller/rendering.rb:44:in `process'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_controller/metal.rb:195:in `dispatch'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_controller/metal.rb:231:in `block in action'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_dispatch/routing/route_set.rb:80:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_dispatch/routing/route_set.rb:48:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_dispatch/journey/router.rb:71:in `block in call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_dispatch/journey/router.rb:59:in `each'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_dispatch/journey/router.rb:59:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_dispatch/routing/route_set.rb:680:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/rack-pjax-0.7.0/lib/rack/pjax.rb:12:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/request_store-1.0.5/lib/request_store/middleware.rb:9:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/simple_captcha2-0.2.1/lib/simple_captcha/middleware.rb:20:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/remotipart-1.2.1/lib/remotipart/middleware.rb:27:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_dispatch/middleware/flash.rb:241:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_dispatch/middleware/cookies.rb:486:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activerecord-4.0.3/lib/active_record/query_cache.rb:36:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activesupport-4.0.3/lib/active_support/callbacks.rb:373:in `_run__4201420912784056511__call__callbacks'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activesupport-4.0.3/lib/active_support/callbacks.rb:80:in `run_callbacks'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/cucumber-rails-1.4.0/lib/cucumber/rails/action_controller.rb:10:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/railties-4.0.3/lib/rails/rack/logger.rb:38:in `call_app'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/railties-4.0.3/lib/rails/rack/logger.rb:20:in `block in call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activesupport-4.0.3/lib/active_support/tagged_logging.rb:67:in `block in tagged'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activesupport-4.0.3/lib/active_support/tagged_logging.rb:25:in `tagged'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activesupport-4.0.3/lib/active_support/tagged_logging.rb:67:in `tagged'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/railties-4.0.3/lib/rails/rack/logger.rb:20:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/activesupport-4.0.3/lib/active_support/cache/strategy/local_cache.rb:83:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/actionpack-4.0.3/lib/action_dispatch/middleware/static.rb:64:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/railties-4.0.3/lib/rails/engine.rb:511:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/railties-4.0.3/lib/rails/application.rb:97:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/rack-1.5.2/lib/rack/builder.rb:138:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/rack-1.5.2/lib/rack/urlmap.rb:65:in `block in call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `each'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/capybara-2.2.1/lib/capybara/server.rb:19:in `call'
/Users/serj/.rvm/gems/ruby-2.0.0-p353#my-project/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
/Users/serj/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
/Users/serj/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
/Users/serj/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
But if I run these failed tests in non parallel mode (I mean cucumber path/to/my/test.rb), it works (and yes, parallel_tests works well for the other tests). How can I solve this trouble?
You'll want to configure config/thinking_sphinx.yml to include that environment variable TEST_ENV_NUMBER in the paths for Sphinx files - the settings listed in the deployment page of the docs should be what's required, plus the port number (the mysql41 setting) as well. Perhaps something like this?
test:
mysql41: <%= ENV['TEST_ENV_NUMBER'].to_i + 9307 %>
pid_file: /path/to/app/tmp/searchd.<%= ENV['TEST_ENV_NUMBER' %>.pid
indices_location: /path/to/app/db/sphinx/<%= ENV['TEST_ENV_NUMBER' %>
configuration_file: /path/to/app/config/test.<%= ENV['TEST_ENV_NUMBER' %>.sphinx.conf
binlog_path: /path/to/app/db/sphinx/<%= ENV['TEST_ENV_NUMBER' %>/binlog
I've not used this approach (or parallel_test) myself, so this is certainly guesswork, but it's worth a shot.

Gitlab integration with openid connect

I was able to add openid support to gitlab via the omniauth-openid gem by doing some modifications to gitlab as documented here:
http://rahul-ghose.blogspot.in/2013/12/setup-gitlab-openid-authentication-with.html
I tried to follow a similar pattern when adding openid-connect support with this github repository:
https://github.com/jjbohn/omniauth-openid-connect
Here is what I did:
I added the following to config/initializers/devise.rb
config.omniauth :openid_connect, :name => "openid-connect", :identifier => "http://<openid-connect-server>/.well-known/openid-configuration", :client_id =>"gitlab", :client_secret => "gitlab"
And the following to "app/controllers/omniauth_callbacks_controller.rb"
def openidconnect
handle_omniauth
end
I get this in the gitlab production.log (stacktrace):
Started GET "/users/auth/openid-connect" for 127.0.0.1 at 2013-03-04 04:58:21 +0530
AttrRequired::AttrMissing ('identifier' required.):
vendor/bundle/ruby/1.9.1/gems/attr_required-1.0.0/lib/attr_required.rb:59:in `attr_missing!'
vendor/bundle/ruby/1.9.1/gems/rack-oauth2-1.0.7/lib/rack/oauth2/client.rb:15:in `initialize'
vendor/bundle/ruby/1.9.1/gems/openid_connect-0.7.3/lib/openid_connect/client.rb:6:in `initialize'
vendor/bundle/ruby/1.9.1/bundler/gems/omniauth-openid-connect-21f0beac1983/lib/omniauth/strategies/openid_connect.rb:58:in `new'
vendor/bundle/ruby/1.9.1/bundler/gems/omniauth-openid-connect-21f0beac1983/lib/omniauth/strategies/openid_connect.rb:58:in `client'
vendor/bundle/ruby/1.9.1/bundler/gems/omniauth-openid-connect-21f0beac1983/lib/omniauth/strategies/openid_connect.rb:87:in `authorize_uri'
vendor/bundle/ruby/1.9.1/bundler/gems/omniauth-openid-connect-21f0beac1983/lib/omniauth/strategies/openid_connect.rb:62:in `request_phase'
vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:214:in `request_call'
vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:181:in `call!'
vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:164:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-cors-0.2.9/lib/rack/cors.rb:54:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-attack-2.3.0/lib/rack/attack.rb:63:in `call'
vendor/bundle/ruby/1.9.1/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call'
vendor/bundle/ruby/1.9.1/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch'
vendor/bundle/ruby/1.9.1/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/flash.rb:241:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/cookies.rb:486:in `call'
vendor/bundle/ruby/1.9.1/gems/activerecord-4.0.3/lib/active_record/query_cache.rb:36:in `call'
vendor/bundle/ruby/1.9.1/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.3/lib/active_support/callbacks.rb:373:in `_run__1476305416189579609__call__callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.3/lib/active_support/callbacks.rb:80:in `run_callbacks'
vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-4.0.3/lib/rails/rack/logger.rb:38:in `call_app'
vendor/bundle/ruby/1.9.1/gems/railties-4.0.3/lib/rails/rack/logger.rb:20:in `block in call'
vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.3/lib/active_support/tagged_logging.rb:67:in `block in tagged'
vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.3/lib/active_support/tagged_logging.rb:25:in `tagged'
vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.3/lib/active_support/tagged_logging.rb:67:in `tagged'
vendor/bundle/ruby/1.9.1/gems/railties-4.0.3/lib/rails/rack/logger.rb:20:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.3/lib/action_dispatch/middleware/request_id.rb:21:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-4.0.3/lib/rails/engine.rb:511:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-4.0.3/lib/rails/application.rb:97:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-4.0.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:138:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/urlmap.rb:65:in `block in call'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `each'
vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `call'
vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:552:in `process_client'
vendor/bundle/ruby/1.9.1/gems/unicorn-worker-killer-0.4.2/lib/unicorn/worker_killer.rb:51:in `process_client'
vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:632:in `worker_loop'
vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:500:in `spawn_missing_workers'
vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:142:in `start'
vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/bin/unicorn_rails:209:in `<top (required)>'
vendor/bundle/ruby/1.9.1/bin/unicorn_rails:23:in `load'
vendor/bundle/ruby/1.9.1/bin/unicorn_rails:23:in `<main>'
Can any one please help me out here?
This worked after using the following configuration:
config.omniauth :openid_connect, {
name: :openid_connect,
scope: [:openid, :profile],
response_type: :code,
client_options: {
port: 8081,
scheme: "https",
host: "myprovider.com",
identifier: "clientID",
secret: "clientSecret",
redirect_uri: "http://myapp.com/users/auth/openid_connect/callback",
},
}
The name must be openid_connect and scopes are the minimal ones required.

Crafting Rails Chapter 7: MultiJson::DecodeError - 756: unexpected token at '"Validation failed: %{errors}"':

I'm following through the 'Crafting Rails' book, and I've come to hurdle I just can't get over in the final Chapter (Chap 7)
When I try to run the project at the end of 7.3, I get:
MultiJson::DecodeError - 756: unexpected token at '"Validation failed: %{errors}"':
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/json-1.6.5/lib/json/common.rb:148:in `parse'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/json-1.6.5/lib/json/common.rb:148:in `parse'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/multi_json-1.1.0/lib/multi_json/engines/json_common.rb:9:in `decode'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/multi_json-1.1.0/lib/multi_json.rb:79:in `decode'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.2/lib/active_support/json/decoding.rb:12:in `decode'
/Users/john/Manuals/Rails/Crafting Rails/Chap7/translator-old/lib/translator/app.rb:32:in `locale_value'
/Users/john/Manuals/Rails/Crafting Rails/Chap7/translator-old/lib/translator/app.rb:55:in `block in evaluate_source'
/Users/john/Manuals/Rails/Crafting Rails/Chap7/translator-old/lib/translator/app.rb:54:in `each'
/Users/john/Manuals/Rails/Crafting Rails/Chap7/translator-old/lib/translator/app.rb:54:in `evaluate_source'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `instance_eval'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `evaluate_source'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/template.rb:144:in `cached_evaluate'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/template.rb:127:in `evaluate'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/haml.rb:24:in `evaluate'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:636:in `render'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:532:in `haml'
/Users/john/Manuals/Rails/Crafting Rails/Chap7/translator-old/lib/translator/app.rb:19:in `exhibit_translations'
/Users/john/Manuals/Rails/Crafting Rails/Chap7/translator-old/lib/translator/app.rb:10:in `block in <class:App>'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:1211:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:1211:in `block in compile!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `[]'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `block (3 levels) in route!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:801:in `route_eval'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `block (2 levels) in route!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:822:in `block in process_route'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in `catch'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in `process_route'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:784:in `block in route!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in `each'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in `route!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:886:in `dispatch!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in `block in call!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `block in invoke'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `catch'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `invoke'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in `call!'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:705:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/nulllogger.rb:9:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/head.rb:9:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:1334:in `block in call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:1416:in `synchronize'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.2/lib/sinatra/base.rb:1334:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/journey-1.0.3/lib/journey/router.rb:68:in `block in call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/journey-1.0.3/lib/journey/router.rb:56:in `each'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/journey-1.0.3/lib/journey/router.rb:56:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/routing/route_set.rb:594:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/sass-3.1.15/lib/sass/plugin/rack.rb:54:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/conditionalget.rb:25:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/head.rb:14:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/flash.rb:242:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/cookies.rb:338:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.2/lib/active_record/query_cache.rb:64:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:443:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:405:in `_run__2584460681594678013__call__1225515721622234840__callbacks'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:405:in `__run_callback'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/reloader.rb:65:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/rack/logger.rb:26:in `call_app'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/rack/logger.rb:16:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.2/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/static.rb:61:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/engine.rb:479:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/application.rb:220:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/content_length.rb:14:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/rack/log_tailer.rb:14:in `call'
/Users/john/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/handler/webrick.rb:59:in `service'
/Users/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/Users/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/Users/john/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
I've tried stripping all symbols out of that string, but no joy - same issue. Any idea what might be going wrong here? I've literally copied & pasted from the book, so I don't think it's a typo. Could possibly be a redis issue (I'm unfamiliar with it), but it seems to be working fine.
Any ideas appreciated
In gem file declare
gem 'yajl-ruby'
It is used to Parse and encode multiple JSON objects to and from streams or strings continuous.
And require 'yajl/json_gem'
in config/application.rb

Resources