簡體   English   中英

我可以在vanity gem中使用oracle_enhanced適配器進行AB測試嗎?

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

對於生產數據庫,我正在使用oracle_enhanced適配器。 虛榮寶石支持嗎? https://github.com/assaf/vanity ,它說:“ Vanity使用內置於Rails的ActiveRecord支持多個SQL存儲(例如MySQL,MariaDB,Postgres,Sqlite等)”。 我不確定這是否包括Oracle。

我嘗試在我的config / vanity.yml中使用以下內容:

production:
  adapter: oracle_enhanced
  host: mydb.XXX.com
  username: XXX
  password: XXX
  port: XXXX
  database: mydb

但是我得到的是以下錯誤消息:

Could not find oracle_enhanced in your load path (RuntimeError)

我的config / database.yml實際上正在使用adapter: oracle_enhanced

有什么建議我想念的嗎?

[更新]下面是堆棧跟蹤:

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>'

然后,我將config / vanity.yml編輯為:

production:
  adapter: active_record
  active_record_adapter: oracle_enhanced
  host: mydb.XXX.com
  database: mydb
  port: XXXX
  username: XXX
  password: XXX

這是更新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'

這是因為配置中的用戶名不是表的所有者嗎? 但是,實際上,我已經授予了配置中用戶名的訪問權限(選擇,插入,更新,刪除)。

這是我的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

是的-Vanity將與ActiveRecord數據庫適配器一起使用。

正如@ksarunas指出的那樣,您需要將適配器添加到gemfile中,並確保適當地require它。

另外,請確保使用自述文件中描述的連接設置,對此適配器的解釋是:

# 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

還要確保運行遷移以創建表:

$ rails generate vanity
$ rake db:migrate

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM