Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Pedro Dellagnelo
Pedro Dellagnelo
3,291 Points

ActiveRecord::ConnectionNotEstablished

When starting a local server and accessing the localhost, I get the following error:

ActiveRecord::ConnectionNotEstablished No connection pool with id primary found.

Running ruby 2.6.6 and rails 5.0.7.2

1 Answer

The problem is with the database or with the way the connection to the database is defined. If you are using sqlite, the current version of the sqlite3 gem will not run with rails 5.0.7.2. You need gem 'sqlite3', '~> 1.3.6' in your Gemfile.