Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build new Rails app Error loading the 'sqlite3' without evidently write verion

When generate new rails app, and start the server "rails s", first massage I got:

Puma caught this error: Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on? can't activate sqlite3 (~> 1.3.6), already activated sqlite3-1.4.0. Make sure all dependencies are added to Gemfile. (LoadError)

after reload a page:

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

  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 reinstall ruby, rails, bundler, all except rvm and I don't know what to do

P.S. this error disappears when I evidently write sqlite3 verion, but it should work fine from a without it!!! Help!What to do? or maybe reinstall all of it?

like image 904
Axelrod Avatar asked Feb 17 '19 22:02

Axelrod


3 Answers

Try to add this on your Gemfile

gem 'sqlite3', '~> 1.3.6'

Instead of having only the SQLite3 without version.

It worked for me

like image 171
Carlos Ribeiro Avatar answered Nov 10 '22 23:11

Carlos Ribeiro


To me, edit your Gemfile:

gem 'sqlite3', '~> 1.3.6'

and run this command:

bundle install

like image 26
jeaddoncel Avatar answered Nov 10 '22 22:11

jeaddoncel


It works for me by adding sqlite3 version in the Gemfile.

like image 1
Liang Lyon Avatar answered Nov 10 '22 23:11

Liang Lyon