Search code examples
ruby-on-railsrubysqlitervmbundler

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?


Solution

  • Try to add this on your Gemfile

    gem 'sqlite3', '~> 1.3.6'
    

    Instead of having only the SQLite3 without version.

    It worked for me