pat / combustion

Simple, elegant testing for Rails Engines
MIT License
708 stars 51 forks source link

No connection pool with 'primary' found #90

Closed crowalert closed 5 years ago

crowalert commented 6 years ago

hi guys i´m lost,

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

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

Any ideas?

crowalert commented 6 years ago

This is the database.yml data:

default: &default
  adapter: oracle_enhanced
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
development:
  <<: *default
  database: 177.232.84.112/EX
pat commented 6 years ago

Is this from running the engine as a Rack app? Does adding a test environment to database.yml help at all, or are you explicitly setting RAILS_ENV to development?

crowalert commented 6 years ago

Actually i´m just setting it up ruby on rails with Oracle DB, to start developing a web app, it's the first time i'm doing this, i have no environment in the config, does it enhance the pool settings?

pat commented 6 years ago

Ah, you're building a Rails app? What's the reasoning for using Combustion?

crowalert commented 6 years ago

Yes, i´ts a ROR web app, but i have this issue configuring i haven´t seen the Localhost:3000 page, i´m just having errors...

pat commented 6 years ago

Why are you using Combustion though?

crowalert commented 6 years ago

'cause when i installed Ruby on Rails and Oracle, installers downloaded and configured combustion automatically, i think, i don´t know what combustion is for...

pat commented 6 years ago

Can you let me know which installers those are? I think they've got it wrong.

Combustion is for developing and testing Rails engines. It's not needed in a Rails app.

pat commented 6 years ago

Which also means: you can remove it from your Gemfile :)

crowalert commented 6 years ago

oracle ruby gems

Those are the tutorials that i followed...

pat commented 6 years ago

Perhaps this page has some helpful things? (Though maybe you've already looked through it): http://www.oracle.com/technetwork/articles/saternos-ror-faq-097353.html

If possible, I would recommend using SQLite to try out Rails rather than Oracle, as it's simpler and easier to get going. Once you're more familiar with Ruby and Rails, you can investigate other databases (Oracle, or PostgreSQL or MySQL).

crowalert commented 6 years ago

do i remove Combustion?, where is it? i don't see it on the gem list...

pat commented 6 years ago

To be honest, I'm not sure you were ever using it. It's not in the list of gems you screenshotted (and they seem to be in alphabetical order, so it should be there) - and it is not one of Rails' default gems. If it's not in your Gemfile, then you're not using it.

crowalert commented 6 years ago

i will check the article you gave me, maybe found the reason of the missing pool...

crowalert commented 6 years ago

or change to sqlite3, thank you friend...