Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No connection pool with id primary found

I just installed Ruby on Rails v5 but when I run the rails server and go to browser, this error comes up?

def retrieve_connection(spec_name) #:nodoc:
    pool = retrieve_connection_pool(spec_name)
    raise ConnectionNotEstablished, "No connection pool with id #{spec_name} found." unless pool
    conn = pool.connection
    raise ConnectionNotEstablished, "No connection for #{spec_name} in connection pool" unless conn
    conn
like image 789
keen Avatar asked Nov 09 '22 05:11

keen


1 Answers

I had this problem myself; one or more of the databases you are using on your database.yml files are currently not installed.


Since you mentioned you "just" installed RoRv5, That Database is most likely sqlite3, make sure u are including gem 'sqlite3' on your gemfile then
run: gem install sqlite3

If you are using a different database, run the corresponding gem install command.

like image 134
JBlanco Avatar answered Nov 15 '22 06:11

JBlanco