mercredi 13 février 2019

raise ConnectionNotEstablished, "No connection pool with '#{spec_name}' found." unless pool LOCALHOST3000 not working

      def retrieve_connection(spec_name) #:nodoc:
    pool = retrieve_connection_pool(spec_name)
    raise ConnectionNotEstablished, "No connection pool with '#{spec_name}' found." unless pool
    pool.connection
  end

I am working on a web app from scratch and found alots of error in the ruby on rails code is above. I installed all the gems required and install and connected home page in controller and route.rb but i can't find the solution for this problem.

activerecord (5.2.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:1009:in `retrieve_connection'

activerecord (5.2.2) lib/active_record/connection_handling.rb:118:in retrieve_connection' activerecord (5.2.2) lib/active_record/connection_handling.rb:90:inconnection' activerecord (5.2.2) lib/active_record/migration.rb:554:in call' actionpack (5.2.2) lib/action_dispatch/middleware/callbacks.rb:28:inblock in call' activesupport (5.2.2) lib/active_support/callbacks.rb:98:in run_callbacks' actionpack (5.2.2) lib/action_dispatch/middleware/callbacks.rb:26:incall' actionpack (5.2.2) lib/action_dispatch/middleware/executor.rb:14:in call' actionpack (5.2.2) lib/action_dispatch/middleware/debug_exceptions.rb:61:incall' web-console (3.7.0) lib/web_console/middleware.rb:135:in call_app' web-console (3.7.0) lib/web_console/middleware.rb:30:inblock in call' web-console (3.7.0) lib/web_console/middleware.rb:20:in catch' web-console (3.7.0) lib/web_console/middleware.rb:20:incall' actionpack (5.2.2) lib/action_dispatch/middleware/show_exceptions.rb:33:in call' railties (5.2.2) lib/rails/rack/logger.rb:38:incall_app' railties (5.2.2) lib/rails/rack/logger.rb:26:in block in call' activesupport (5.2.2) lib/active_support/tagged_logging.rb:71:inblock in tagged' activesupport (5.2.2) lib/active_support/tagged_logging.rb:28:in tagged' activesupport (5.2.2) lib/active_support/tagged_logging.rb:71:intagged' railties (5.2.2) lib/rails/rack/logger.rb:26:in call' sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:incall' actionpack (5.2.2) lib/action_dispatch/middleware/remote_ip.rb:81:in call' actionpack (5.2.2) lib/action_dispatch/middleware/request_id.rb:27:incall' rack (2.0.6) lib/rack/method_override.rb:22:in call' rack (2.0.6) lib/rack/runtime.rb:22:incall' activesupport (5.2.2) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in call' actionpack (5.2.2) lib/action_dispatch/middleware/executor.rb:14:incall' actionpack (5.2.2) lib/action_dispatch/middleware/static.rb:127:in call' rack (2.0.6) lib/rack/sendfile.rb:111:incall' railties (5.2.2) lib/rails/engine.rb:524:in call' puma (3.12.0) lib/puma/configuration.rb:225:incall' puma (3.12.0) lib/puma/server.rb:658:in handle_request' puma (3.12.0) lib/puma/server.rb:472:inprocess_client' puma (3.12.0) lib/puma/server.rb:332:in block in run' puma (3.12.0) lib/puma/thread_pool.rb:133:inblock in spawn_thread'

Aucun commentaire:

Enregistrer un commentaire